Class CSSMediaPanel

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, ActionMap

public class CSSMediaPanel extends JPanel implements ActionMap
This class represents a panel to edit/add/remove CSS media.
Version:
$Id: CSSMediaPanel.java 1804130 2017-08-04 14:41:11Z ssteiner $
See Also:
  • Field Details

    • RESOURCES

      protected static final String RESOURCES
      The resource file name
      See Also:
    • bundle

      protected static ResourceBundle bundle
      The resource bundle
    • resources

      protected static ResourceManager resources
      The resource manager
    • removeButton

      protected JButton removeButton
      The button to remove a CSS medium from the list.
    • addButton

      protected JButton addButton
      The button to add a CSS medium from the list.
    • clearButton

      protected JButton clearButton
      The button to clear the CSS media list.
    • listModel

      protected DefaultListModel listModel
      The list that represents the CSS media.
    • mediaList

      protected JList mediaList
      The list that represents the CSS media.
    • listeners

      protected Map listeners
      The map that contains the listeners
  • Constructor Details

    • CSSMediaPanel

      public CSSMediaPanel()
      Constructs a new panel to edit CSS media.
  • Method Details

    • updateButtons

      protected void updateButtons()
      Updates the button states.
    • setMedia

      public void setMedia(List mediaList)
      Sets the list of media to edit.
      Parameters:
      mediaList - the list of media to edit
    • setMedia

      public void setMedia(String media)
      Sets the list of media to edit to the specified media list (separated by space).
      Parameters:
      media - the media separated by space
    • getMedia

      public List getMedia()
      Returns the list of media.
    • getMediaAsString

      public String getMediaAsString()
      Returns the media list as a string separated by space.
    • showDialog

      public static int showDialog(Component parent, String title)
      Brings up a modal dialog to edit/add/remove CSS media.
      Parameters:
      parent - the parent of this dialog
      title - the title of this dialog
    • showDialog

      public static int showDialog(Component parent, String title, List mediaList)
      Brings up a modal dialog to edit/add/remove CSS media.
      Parameters:
      parent - the parent of this dialog
      title - the title of this dialog
      mediaList - the list of media
    • showDialog

      public static int showDialog(Component parent, String title, String media)
      Brings up a modal dialog to edit/add/remove CSS media.
      Parameters:
      parent - the parent of this dialog
      title - the title of this dialog
      media - the list of media
    • getAction

      public Action getAction(String key) throws MissingListenerException
      Returns the action associated with the given string or null on error
      Specified by:
      getAction in interface ActionMap
      Parameters:
      key - the key mapped with the action to get
      Throws:
      MissingListenerException - if the action is not found
    • main

      public static void main(String[] args)
      Main - debug -