public class PaletteHelper
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
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) |
public static javax.swing.JPanel createCheckbox(java.lang.String boxlabel, java.lang.String[] buttons, boolean[] checked, java.awt.event.ActionListener al)
boxlabel
- the string to use for the box titlebuttons
- the list of button nameschecked
- the initial state of each checkbox itemal
- the actionlistener to invoke for a button. the
actioncommand is set to a string containing the integer
index of the button.AbstractButton.setActionCommand(String)
,
JCheckBox
public static javax.swing.JPanel createRadiobox(java.lang.String boxlabel, java.lang.String[] buttons, int initiallySelected, java.awt.event.ActionListener al)
boxlabel
- the string to use for the box titlebuttons
- the list of button namesinitiallySelected
- 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.AbstractButton.setActionCommand(String)
,
ButtonGroup
public static javax.swing.JPanel createHorizontalPanel(java.lang.String title)
title
- the title of the panel (null allowed)public static javax.swing.JPanel createVerticalPanel(java.lang.String title)
title
- the title of the panel (null allowed)public static javax.swing.JPanel createPaletteJPanel(java.lang.String title)
title
- the title of the panel (null allowed)public static javax.swing.JTextField createTextEntry(java.lang.String title, java.lang.String entry, javax.swing.JComponent parent)
title
- the title of the frameentry
- the name of the entry fieldparent
- the component to add ourselves topublic static javax.swing.JTextArea createTextArea(java.lang.String title, java.lang.String entry, javax.swing.JComponent parent, int rows, int cols)
title
- the title of the frameentry
- the name of the entry fieldparent
- the component to add ourselves torows
- the number of rowscols
- the number of columnspublic static javax.swing.JInternalFrame getPaletteInternalWindow(Layer layer, javax.swing.event.InternalFrameListener ifl)
layer
- the layer to get the palette forifl
- the listener to associate with the palettepublic static javax.swing.JFrame getPaletteWindow(Layer layer, java.awt.event.ComponentListener cl)
layer
- the layer to get the palette forcl
- the listener to associate with the palettepublic static java.awt.Component getLayerGUIComponent(Layer layer)
layer
- the layer to get the palette forpublic static javax.swing.JInternalFrame getPaletteInternalWindow(java.awt.Component gui, java.lang.String windowName, javax.swing.event.InternalFrameListener ifl)
gui
- the Component to place in the windowifl
- the listener to associate with the palettepublic static javax.swing.JFrame getPaletteWindow(java.awt.Component gui, java.lang.String windowName, java.awt.event.ComponentListener cl)
gui
- the Component to place in the windowcl
- the listener to associate with the palettepublic static javax.swing.JFrame getNoScrollPaletteWindow(java.awt.Component gui, java.lang.String windowName, java.awt.event.ComponentListener cl)
gui
- the Component to place in the windowcl
- the listener to associate with the palettepublic static javax.swing.JComponent getToolBarFill(int orientation)
Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details