|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Component java.awt.Container javax.swing.JComponent javax.swing.JPanel com.bbn.openmap.tools.symbology.milStd2525.SymbolChooser
public class SymbolChooser
The SymbolChooser is a GUI symbol builder. It can be used in stand-alone mode to create image files, or be integrated into a java application to create ImageIcons.
To bring up this chooser, run this class as a standalone application, or call showDialog(..)
Nested Class Summary | |
---|---|
class |
SymbolChooser.SymbolTreeHolder
|
Nested classes/interfaces inherited from class javax.swing.JPanel |
---|
javax.swing.JPanel.AccessibleJPanel |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
javax.swing.JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
java.awt.Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary | |
---|---|
protected boolean |
allowCreateImage
|
protected javax.swing.JButton |
clearFeaturesButton
|
static java.lang.String |
CREATE_IMAGE_CMD
|
protected javax.swing.JButton |
createImageFileButton
|
protected javax.swing.tree.DefaultMutableTreeNode |
currentSymbol
|
protected SymbolChooser.SymbolTreeHolder |
currentSymbolTreeHolder
|
static int |
DEFAULT_ICON_DIMENSION
|
protected static javax.swing.ImageIcon |
DEFAULT_SYMBOL_IMAGE
|
protected DimensionQueryPanel |
dqp
|
protected DrawingAttributes |
drawingAttributes
|
static java.lang.String |
EMPTY_CODE
|
static java.lang.String |
EMPTY_FEATURE_LIST
|
protected java.awt.Dimension |
iconDimension
|
protected SymbolReferenceLibrary |
library
|
protected javax.swing.JTextField |
nameField
|
static java.lang.String |
NAMEFIELD_CMD
|
protected javax.swing.JPanel |
optionPanel
|
protected javax.swing.ImageIcon |
symbolImage
|
protected javax.swing.JLabel |
symbolImageLabel
|
protected java.util.List |
trees
|
protected javax.swing.JScrollPane |
treeView
|
Fields inherited from class javax.swing.JComponent |
---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
SymbolChooser(SymbolReferenceLibrary srl)
|
Method Summary | |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent ae)
|
static javax.swing.JDialog |
createDialog(java.awt.Component c,
java.lang.String title,
boolean modal,
SymbolChooser chooserPane,
java.awt.event.ActionListener okListener,
java.awt.event.ActionListener cancelListener)
Creates JDialog window displaying a SymbolChooser. |
protected java.util.List |
createNodes(SymbolReferenceLibrary srl)
Initialization method to create the SymbolTreeHolders from the SymbolReferenceLibrary. |
java.lang.String |
getCode()
Get the current symbol code listed in the GUI. |
java.awt.Dimension |
getDesiredIconDimension()
|
javax.swing.ImageIcon |
getImageIcon()
Get the icon displayed in the GUI. |
static javax.swing.ImageIcon |
getNotFoundImageIcon()
Convenience function to get a standard blank image for those SymbolParts that are not found by the SymbolImageMaker. |
protected void |
handleManualNameFieldUpdate(java.lang.String text)
Update the GUI to react to code typed into the string window. |
protected void |
init(SymbolReferenceLibrary srl,
java.util.List trees)
Create the GUI based on the contents of the SymbolReferenceLibrary and the SymbolPartTrees created from the options. |
boolean |
isAllowCreateImage()
|
static void |
main(java.lang.String[] args)
|
void |
setAllowCreateImage(boolean allowCreateImage)
|
void |
setCode(java.lang.String code)
Set the symbol code in the GUI. |
void |
setDesiredIconDimension(java.awt.Dimension d)
Set the dimension o the icon to be created. |
void |
setImageIcon(javax.swing.ImageIcon ii)
Set the current icon in the display. |
void |
setSelectedTreeHolder(SymbolChooser.SymbolTreeHolder sth)
Update the GUI with the contents of the provided SymbolTreeHolder, reflecting a new set of symbols. |
static javax.swing.ImageIcon |
showDialog(java.awt.Component component,
java.lang.String title,
SymbolReferenceLibrary srl,
java.lang.String defaultSymbolCode)
|
Methods inherited from class javax.swing.JPanel |
---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
Methods inherited from class javax.swing.JComponent |
---|
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
Methods inherited from class java.awt.Container |
---|
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree |
Methods inherited from class java.awt.Component |
---|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String CREATE_IMAGE_CMD
public static final java.lang.String NAMEFIELD_CMD
public static final java.lang.String EMPTY_FEATURE_LIST
public static final int DEFAULT_ICON_DIMENSION
public static final java.lang.String EMPTY_CODE
protected static javax.swing.ImageIcon DEFAULT_SYMBOL_IMAGE
protected DrawingAttributes drawingAttributes
protected javax.swing.ImageIcon symbolImage
protected javax.swing.tree.DefaultMutableTreeNode currentSymbol
protected SymbolChooser.SymbolTreeHolder currentSymbolTreeHolder
protected SymbolReferenceLibrary library
protected java.util.List trees
protected DimensionQueryPanel dqp
protected javax.swing.JButton clearFeaturesButton
protected javax.swing.JButton createImageFileButton
protected javax.swing.JTextField nameField
protected javax.swing.JLabel symbolImageLabel
protected javax.swing.JScrollPane treeView
protected javax.swing.JPanel optionPanel
protected java.awt.Dimension iconDimension
protected boolean allowCreateImage
Constructor Detail |
---|
public SymbolChooser(SymbolReferenceLibrary srl)
Method Detail |
---|
public void setSelectedTreeHolder(SymbolChooser.SymbolTreeHolder sth)
sth
- public static javax.swing.ImageIcon getNotFoundImageIcon()
protected void init(SymbolReferenceLibrary srl, java.util.List trees)
srl
- trees
- public void actionPerformed(java.awt.event.ActionEvent ae)
actionPerformed
in interface java.awt.event.ActionListener
protected void handleManualNameFieldUpdate(java.lang.String text)
text
- protected java.util.List createNodes(SymbolReferenceLibrary srl) throws FormatException
srl
-
FormatException
public java.lang.String getCode()
public void setCode(java.lang.String code)
public javax.swing.ImageIcon getImageIcon()
public void setImageIcon(javax.swing.ImageIcon ii)
ii
- public void setDesiredIconDimension(java.awt.Dimension d)
d
- public java.awt.Dimension getDesiredIconDimension()
public boolean isAllowCreateImage()
public void setAllowCreateImage(boolean allowCreateImage)
allowCreateImage
- The allowCreateImage to set.public static javax.swing.ImageIcon showDialog(java.awt.Component component, java.lang.String title, SymbolReferenceLibrary srl, java.lang.String defaultSymbolCode) throws java.awt.HeadlessException
java.awt.HeadlessException
public static javax.swing.JDialog createDialog(java.awt.Component c, java.lang.String title, boolean modal, SymbolChooser chooserPane, java.awt.event.ActionListener okListener, java.awt.event.ActionListener cancelListener) throws java.awt.HeadlessException
java.awt.HeadlessException
public static void main(java.lang.String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |