PaletteHelper (OpenMap API)
Date: 2016-12-09

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.bbn.openmap.util
Class PaletteHelper

    java.lang.Object
      com.bbn.openmap.util.PaletteHelper

    public class PaletteHelper

extends java.lang.Object

Helps create palette GUI widgets.

Method Summary
`static javax.swing.JPanel` | `createCheckbox(java.lang.String boxlabel, java.lang.String[] buttons, boolean[] checked, java.awt.event.ActionListener al)` Create a panel containing a checkbox.
`static javax.swing.JPanel` | `createHorizontalPanel(java.lang.String title)` Create a panel that does horizontal layout
`static javax.swing.JPanel` | `createPaletteJPanel(java.lang.String title)` Create a panel with a border and title
`static javax.swing.JPanel` | `createRadiobox(java.lang.String boxlabel, java.lang.String[] buttons, int initiallySelected, java.awt.event.ActionListener al)` Create a panel containing a radiobox.
`static javax.swing.JTextArea` | `createTextArea(java.lang.String title, java.lang.String entry, javax.swing.JComponent parent, int rows, int cols)` Create and add a text area to a JComponent.
`static javax.swing.JTextField` | `createTextEntry(java.lang.String title, java.lang.String entry, javax.swing.JComponent parent)` Create and add a text entry field to a JComponent.
`static javax.swing.JPanel` | `createVerticalPanel(java.lang.String title)` Create a panel that does vertical layout
`static java.awt.Component` | `getLayerGUIComponent(Layer layer)` Get a Component that represents a layer's GUI.
`static javax.swing.JFrame` | `getNoScrollPaletteWindow(java.awt.Component gui, java.lang.String windowName, java.awt.event.ComponentListener cl)` Get a layer's associated palette as a top-level window
`static javax.swing.JInternalFrame` | `getPaletteInternalWindow(java.awt.Component gui, java.lang.String windowName, javax.swing.event.InternalFrameListener ifl)` Get a layer's associated palette as an internal window
`static javax.swing.JInternalFrame` | `getPaletteInternalWindow(Layer layer, javax.swing.event.InternalFrameListener ifl)` Get a layer's associated palette as an internal window
`static javax.swing.JFrame` | `getPaletteWindow(java.awt.Component gui, java.lang.String windowName, java.awt.event.ComponentListener cl)` Get a layer's associated palette as a top-level window
`static javax.swing.JFrame` | `getPaletteWindow(Layer layer, java.awt.event.ComponentListener cl)` Get a layer's associated palette as a top-level window
`static javax.swing.JComponent` | `getToolBarFill(int orientation)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### createCheckbox

    public static javax.swing.JPanel createCheckbox(java.lang.String boxlabel,
                                                    java.lang.String[] buttons,
                                                    boolean[] checked,
                                                    java.awt.event.ActionListener al)

  Create a panel containing a checkbox.

  Parameters:
    `boxlabel` - the string to use for the box title
    `buttons` - the list of button names
    `checked` - the initial state of each checkbox item
    `al` - the actionlistener to invoke for a button. the actioncommand is set to a string containing the integer index of the button.
  Returns:
    the JPanel the the buttons are placed in
  See Also:
    `AbstractButton.setActionCommand(String)`, `JCheckBox`

### createRadiobox

    public static javax.swing.JPanel createRadiobox(java.lang.String boxlabel,
                                                    java.lang.String[] buttons,
                                                    int initiallySelected,
                                                    java.awt.event.ActionListener al)

  Create a panel containing a radiobox.

  Parameters:
    `boxlabel` - the string to use for the box title
    `buttons` - the list of button names
    `initiallySelected` - the index of the initially selected button. -1 for no button initially selected.
    `al` - the actionlistener to invoke for a button. the actioncommand is set to a string containing the integer index of the button.
  Returns:
    the JPanel the the buttons are placed in
  See Also:
    `AbstractButton.setActionCommand(String)`, `ButtonGroup`

### createHorizontalPanel

    public static javax.swing.JPanel createHorizontalPanel(java.lang.String title)

  Create a panel that does horizontal layout

  Parameters:
    `title` - the title of the panel (null allowed)
  Returns:
    the panel that got created

### createVerticalPanel

    public static javax.swing.JPanel createVerticalPanel(java.lang.String title)

  Create a panel that does vertical layout

  Parameters:
    `title` - the title of the panel (null allowed)
  Returns:
    the panel that got created

### createPaletteJPanel

    public static javax.swing.JPanel createPaletteJPanel(java.lang.String title)

  Create a panel with a border and title

  Parameters:
    `title` - the title of the panel (null allowed)
  Returns:
    the panel that got created

### createTextEntry

    public static javax.swing.JTextField createTextEntry(java.lang.String title,
                                                         java.lang.String entry,
                                                         javax.swing.JComponent parent)

  Create and add a text entry field to a JComponent.

  Parameters:
    `title` - the title of the frame
    `entry` - the name of the entry field
    `parent` - the component to add ourselves to
  Returns:
    the text field

### createTextArea

    public static javax.swing.JTextArea createTextArea(java.lang.String title,
                                                       java.lang.String entry,
                                                       javax.swing.JComponent parent,
                                                       int rows,
                                                       int cols)

  Create and add a text area to a JComponent.

  Parameters:
    `title` - the title of the frame
    `entry` - the name of the entry field
    `parent` - the component to add ourselves to
    `rows` - the number of rows
    `cols` - the number of columns
  Returns:
    the text area

### getPaletteInternalWindow

    public static javax.swing.JInternalFrame getPaletteInternalWindow(Layer layer,
                                                                      javax.swing.event.InternalFrameListener ifl)

  Get a layer's associated palette as an internal window

  Parameters:
    `layer` - the layer to get the palette for
    `ifl` - the listener to associate with the palette
  Returns:
    the frame that the palette is in

### getPaletteWindow

    public static javax.swing.JFrame getPaletteWindow(Layer layer,
                                                      java.awt.event.ComponentListener cl)

  Get a layer's associated palette as a top-level window

  Parameters:
    `layer` - the layer to get the palette for
    `cl` - the listener to associate with the palette
  Returns:
    the frame that the palette is in

### getLayerGUIComponent

    public static java.awt.Component getLayerGUIComponent(Layer layer)

  Get a Component that represents a layer's GUI.

  Parameters:
    `layer` - the layer to get the palette for
  Returns:
    the Component that represents the GUI for the layer.

### getPaletteInternalWindow

    public static javax.swing.JInternalFrame getPaletteInternalWindow(java.awt.Component gui,
                                                                      java.lang.String windowName,
                                                                      javax.swing.event.InternalFrameListener ifl)

  Get a layer's associated palette as an internal window

  Parameters:
    `gui` - the Component to place in the window
    `windowName` - the title of the palette
    `ifl` - the listener to associate with the palette
  Returns:
    the frame that the palette is in

### getPaletteWindow

    public static javax.swing.JFrame getPaletteWindow(java.awt.Component gui,
                                                      java.lang.String windowName,
                                                      java.awt.event.ComponentListener cl)

  Get a layer's associated palette as a top-level window

  Parameters:
    `gui` - the Component to place in the window
    `windowName` - the title of the window
    `cl` - the listener to associate with the palette
  Returns:
    the frame that the palette is in

### getNoScrollPaletteWindow

    public static javax.swing.JFrame getNoScrollPaletteWindow(java.awt.Component gui,
                                                              java.lang.String windowName,
                                                              java.awt.event.ComponentListener cl)

  Get a layer's associated palette as a top-level window

  Parameters:
    `gui` - the Component to place in the window
    `windowName` - the title of the frame
    `cl` - the listener to associate with the palette
  Returns:
    the frame that the palette is in

### getToolBarFill

    public static javax.swing.JComponent getToolBarFill(int orientation)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details