|
Préférences
Moteurs de recherche
|
||||||||||||||||||||||||
JavaTM 2 Platform Std. Ed. v1.4.2
javax.swing.plaf.metal
|
Nested Class Summary | |
protected class |
MetalFileChooserUI.DirectoryComboBoxAction
Acts when DirectoryComboBox has changed the selected item. |
protected class |
MetalFileChooserUI.DirectoryComboBoxModel
Data model for a type-face selection combo-box. |
protected class |
MetalFileChooserUI.FileRenderer
|
protected class |
MetalFileChooserUI.FilterComboBoxModel
Data model for a type-face selection combo-box. |
class |
MetalFileChooserUI.FilterComboBoxRenderer
Render different type sizes and styles. |
protected class |
MetalFileChooserUI.SingleClickListener
|
Field Summary |
Constructor Summary | |
MetalFileChooserUI(JFileChooser filechooser)
|
Methods inherited from class javax.swing.plaf.ComponentUI |
contains, getAccessibleChild, getAccessibleChildrenCount, paint, update |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public MetalFileChooserUI(JFileChooser filechooser)
Method Detail |
public static ComponentUI createUI(JComponent c)
ComponentUI
createUI
method that returns an instance of that UI delegate subclass.
If the UI delegate subclass is stateless, it may return an instance
that is shared by multiple components. If the UI delegate is
stateful, then it should return a new instance per component.
The default implementation of this method throws an error, as it
should never be invoked.
public void installUI(JComponent c)
ComponentUI
ComponentUI
instance is being installed
as the UI delegate on the specified component. This method should
completely configure the component for the look and feel,
including the following:
LayoutManager
on the component if necessary.
PropertyChangeListener
on the component in order
to detect and respond to component property changes appropriately.
installUI
in class BasicFileChooserUI
public void uninstallComponents(JFileChooser fc)
uninstallComponents
in class BasicFileChooserUI
public void installComponents(JFileChooser fc)
installComponents
in class BasicFileChooserUI
protected JPanel getButtonPanel()
protected JPanel getBottomPanel()
protected void installStrings(JFileChooser fc)
installStrings
in class BasicFileChooserUI
protected void installListeners(JFileChooser fc)
installListeners
in class BasicFileChooserUI
protected ActionMap getActionMap()
protected ActionMap createActionMap()
protected JPanel createList(JFileChooser fc)
protected JPanel createDetailsView(JFileChooser fc)
public ListSelectionListener createListSelectionListener(JFileChooser fc)
createListSelectionListener
in class BasicFileChooserUI
fc
- a JFileChooser
ListSelectionListener
public void uninstallUI(JComponent c)
ComponentUI
installUI
. This method is invoked when this
UIComponent
instance is being removed as the UI delegate
for the specified component. This method should undo the
configuration performed in installUI
, being careful to
leave the JComponent
instance in a clean state (no
extraneous listeners, look-and-feel-specific property objects, etc.).
This should include the following:
uninstallUI
in class BasicFileChooserUI
public Dimension getPreferredSize(JComponent c)
JFileChooser
.
The preferred size is at least as large,
in both height and width,
as the preferred size recommended
by the file chooser's layout manager.
getPreferredSize
in class ComponentUI
c
- a JFileChooser
Dimension
specifying the preferred
width and height of the file chooserJComponent.getPreferredSize()
,
LayoutManager.preferredLayoutSize(java.awt.Container)
public Dimension getMinimumSize(JComponent c)
JFileChooser
.
getMinimumSize
in class ComponentUI
c
- a JFileChooser
Dimension
specifying the minimum
width and height of the file chooserJComponent.getMinimumSize()
,
LayoutManager.minimumLayoutSize(java.awt.Container)
,
ComponentUI.getPreferredSize(javax.swing.JComponent)
public Dimension getMaximumSize(JComponent c)
JFileChooser
.
getMaximumSize
in class ComponentUI
c
- a JFileChooser
Dimension
specifying the maximum
width and height of the file chooserJComponent.getMaximumSize()
,
LayoutManager2.maximumLayoutSize(java.awt.Container)
public PropertyChangeListener createPropertyChangeListener(JFileChooser fc)
createPropertyChangeListener
in class BasicFileChooserUI
protected void removeControlButtons()
protected void addControlButtons()
public void ensureFileIsVisible(JFileChooser fc, File f)
ensureFileIsVisible
in class BasicFileChooserUI
public void rescanCurrentDirectory(JFileChooser fc)
rescanCurrentDirectory
in class BasicFileChooserUI
public String getFileName()
getFileName
in class BasicFileChooserUI
public void setFileName(String filename)
setFileName
in class BasicFileChooserUI
protected void setDirectorySelected(boolean directorySelected)
setDirectorySelected
in class BasicFileChooserUI
directorySelected
- if a directory is currently selected.public String getDirectoryName()
getDirectoryName
in class BasicFileChooserUI
public void setDirectoryName(String dirname)
setDirectoryName
in class BasicFileChooserUI
protected javax.swing.plaf.metal.MetalFileChooserUI.DirectoryComboBoxRenderer createDirectoryComboBoxRenderer(JFileChooser fc)
protected MetalFileChooserUI.DirectoryComboBoxModel createDirectoryComboBoxModel(JFileChooser fc)
protected MetalFileChooserUI.FilterComboBoxRenderer createFilterComboBoxRenderer()
protected MetalFileChooserUI.FilterComboBoxModel createFilterComboBoxModel()
public void valueChanged(ListSelectionEvent e)
protected JButton getApproveButton(JFileChooser fc)
getApproveButton
in class BasicFileChooserUI