Class MetalFileChooserUI


public class MetalFileChooserUI extends BasicFileChooserUI
Metal L&F implementation of a FileChooser.
  • Constructor Details Link icon

    • MetalFileChooserUI Link icon

      public MetalFileChooserUI(JFileChooser filechooser)
      Constructs a new instance of MetalFileChooserUI.
      Parameters:
      filechooser - a JFileChooser
  • Method Details Link icon

    • createUI Link icon

      public static ComponentUI createUI(JComponent c)
      Constructs a new instance of MetalFileChooserUI.
      Parameters:
      c - a component
      Returns:
      a new instance of MetalFileChooserUI
    • getButtonPanel Link icon

      protected JPanel getButtonPanel()
      Returns the button panel.
      Returns:
      the button panel
    • getBottomPanel Link icon

      protected JPanel getBottomPanel()
      Returns the bottom panel.
      Returns:
      the bottom panel
    • getActionMap Link icon

      protected ActionMap getActionMap()
      Returns an instance of ActionMap.
      Returns:
      an instance of ActionMap
    • createActionMap Link icon

      protected ActionMap createActionMap()
      Constructs an instance of ActionMap.
      Returns:
      an instance of ActionMap
    • createList Link icon

      protected JPanel createList(JFileChooser fc)
      Constructs a details view.
      Parameters:
      fc - a JFileChooser
      Returns:
      the list
    • createDetailsView Link icon

      protected JPanel createDetailsView(JFileChooser fc)
      Constructs a details view.
      Parameters:
      fc - a JFileChooser
      Returns:
      the details view
    • createListSelectionListener Link icon

      public ListSelectionListener createListSelectionListener(JFileChooser fc)
      Creates a selection listener for the list of files and directories.
      Overrides:
      createListSelectionListener in class BasicFileChooserUI
      Parameters:
      fc - a JFileChooser
      Returns:
      a ListSelectionListener
    • getPreferredSize Link icon

      public Dimension getPreferredSize(JComponent c)
      Returns the preferred size of the specified 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.
      Overrides:
      getPreferredSize in class ComponentUI
      Parameters:
      c - a JFileChooser
      Returns:
      a Dimension specifying the preferred width and height of the file chooser
      See Also:
    • getMinimumSize Link icon

      public Dimension getMinimumSize(JComponent c)
      Returns the minimum size of the JFileChooser.
      Overrides:
      getMinimumSize in class ComponentUI
      Parameters:
      c - a JFileChooser
      Returns:
      a Dimension specifying the minimum width and height of the file chooser
      See Also:
    • getMaximumSize Link icon

      public Dimension getMaximumSize(JComponent c)
      Returns the maximum size of the JFileChooser.
      Overrides:
      getMaximumSize in class ComponentUI
      Parameters:
      c - a JFileChooser
      Returns:
      a Dimension specifying the maximum width and height of the file chooser
      See Also:
    • removeControlButtons Link icon

      protected void removeControlButtons()
      Removes control buttons from bottom panel.
    • addControlButtons Link icon

      protected void addControlButtons()
      Adds control buttons to bottom panel.
    • setDirectorySelected Link icon

      protected void setDirectorySelected(boolean directorySelected)
      Property to remember whether a directory is currently selected in the UI. This is normally called by the UI on a selection event.
      Overrides:
      setDirectorySelected in class BasicFileChooserUI
      Parameters:
      directorySelected - if a directory is currently selected.
      Since:
      1.4
    • getDirectoryName Link icon

      public String getDirectoryName()
      Returns the directory name.
      Overrides:
      getDirectoryName in class BasicFileChooserUI
      Returns:
      the directory name
    • setDirectoryName Link icon

      public void setDirectoryName(String dirname)
      Sets the directory name.
      Overrides:
      setDirectoryName in class BasicFileChooserUI
      Parameters:
      dirname - the directory name
    • createDirectoryComboBoxModel Link icon

      protected MetalFileChooserUI.DirectoryComboBoxModel createDirectoryComboBoxModel(JFileChooser fc)
      Constructs a new instance of DataModel for DirectoryComboBox.
      Parameters:
      fc - a JFileChooser
      Returns:
      a new instance of DataModel for DirectoryComboBox
    • createFilterComboBoxRenderer Link icon

      protected MetalFileChooserUI.FilterComboBoxRenderer createFilterComboBoxRenderer()
      Constructs a Renderer for types ComboBox.
      Returns:
      a Renderer for types ComboBox
    • createFilterComboBoxModel Link icon

      protected MetalFileChooserUI.FilterComboBoxModel createFilterComboBoxModel()
      Constructs a DataModel for types ComboBox.
      Returns:
      a DataModel for types ComboBox
    • valueChanged Link icon

      public void valueChanged(ListSelectionEvent e)
      Invokes when ListSelectionEvent occurs.
      Parameters:
      e - an instance of ListSelectionEvent