public class TLcdMS2525bObjectCustomizer extends JPanel implements Customizer, PropertyChangeListener
ILcdEditableMS2525bCoded
instances.
By default, it contains functionality to customize/view the following properties of a symbol: hierarchy, affiliation, echelon, order of battle, status, country, display options and text modifiers. For each property, a separate child customizer is used; these customizers are marked by a unique ID:
TLcdMS2525bObjectCustomizer.AFFILIATION_CUSTOMIZER
TLcdMS2525bObjectCustomizer.STATUS_CUSTOMIZER
This customizer can be adapted: child customizers can be removed/replaced and the layout can be customized. The following methods can be overridden to achieve this:
createCustomizer(int aID)
: this method is used to create a particular child customizer (based on its unique ID).
It is invoked for all available ID's.
insertCustomizers(int aID[], Customizer aCustomizer[])
: this method is used to build the layout of this general customizer,
based on which child customizers are present. It is invoked after all createCustomizer(int aID)
calls.
This customizer implementation automatically adapts to the symbology standard used for the set object, according to the following general rules applied by the Luciad MIL-STD 2525 API:
TLcdEditableMS2525bObject
, the symbology standard
is retrieved through TLcdEditableMS2525bObject.getMS2525Standard()
,ILcdEditableMS2525bCoded
, the symbology standard
is based upon the boolean System property com.luciad.symbology.milstd2525b.ms2525c
.Modifier and Type | Class and Description |
---|---|
static class |
TLcdMS2525bObjectCustomizer.FilterType
Indicates the type of the filter used by this customizer
|
JPanel.AccessibleJPanel
JComponent.AccessibleJComponent
Container.AccessibleAWTContainer
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
Modifier and Type | Field and Description |
---|---|
static int |
AFFILIATION_CUSTOMIZER
Identifier for the affiliation customizer.
|
static int |
COUNTRY_CUSTOMIZER
Identifier for the country customizer.
|
static int |
DISPLAY_OPTION_CUSTOMIZER
Identifier for the display option customizer.
|
static int |
ECHELON_CUSTOMIZER
Identifier for the echelon customizer.
|
static int |
HIERARCHY_CUSTOMIZER
Identifier for the hierarchy customizer.
|
static int |
INFORMATION_CUSTOMIZER
Identifier for the customizer that displays the symbology code.
|
static int |
ORDEROFBATTLE_CUSTOMIZER
Identifier for the order of battle customizer.
|
static int |
PREVIEW_CUSTOMIZER
Identifier for the customizer that displays a preview of the symbol.
|
static String |
PROPERTY_MS2525B_CODE_CHANGED
When the MS2525b code is changed in the customizer
a PROPERTY_MS2525B_CODE_CHANGED event is passed to the property change listeners
|
static String |
PROPERTY_MS2525B_HIERARCHY_CHANGED
When the MS2525b hierarchy is changed in the customizer, a
PROPERTY_MS2525B_HIERARCHY_CHANGED event is passed to the property change listeners.
|
static String |
PROPERTY_MS2525B_STYLE_CHANGED
When the MS2525b style (the outlining property) is changed in the customizer
a PROPERTY_MS2525B_STYLE_CHANGED event is passed to the property change listeners
|
static String |
PROPERTY_MS2525B_TEXT_MODIFIERS_CHANGED
When one or more text modifiers are changed in the customizer
a PROPERTY_MS2525B_TEXT_MODIFIERS_CHANGED event is passed to the property change listeners.
|
static String |
PROPERTY_SELECTION_OK
When the selection in the customizer is valid, a PROPERTY_SELECTION_OK
event is passed to the property change listeners
|
static int |
STATUS_CUSTOMIZER
Identifier for the status customizer.
|
static int |
TEXT_MODIFIER_ADDITIONAL_INFORMATION_CUSTOMIZER
Identifier for the customizer of
ILcdMS2525bCoded.sAdditionalInformation . |
static int |
TEXT_MODIFIER_ALTITUDE_DEPTH_CUSTOMIZER
Identifier for the customizer of
ILcdMS2525bCoded.sAltitudeDepth . |
static int |
TEXT_MODIFIER_COMBAT_EFFECTIVENESS_CUSTOMIZER
Identifier for the customizer of
ILcdMS2525bCoded.sCombatEffectiveness . |
static int |
TEXT_MODIFIER_DATE_TIME_GROUP_CUSTOMIZER
Identifier for the customizer of
ILcdMS2525bCoded.sDateTimeGroup . |
static int |
TEXT_MODIFIER_EFFECTIVE_TIME_CUSTOMIZER
Identifier for the customizer of
ILcdMS2525bCoded.sEffectiveTime . |
static int |
TEXT_MODIFIER_EVALUATION_RATING_CUSTOMIZER
Identifier for the customizer of
ILcdMS2525bCoded.sEvaluationRating . |
static int |
TEXT_MODIFIER_HIGHER_FORMATION_CUSTOMIZER
Identifier for the customizer of
ILcdMS2525bCoded.sHigherFormation . |
static int |
TEXT_MODIFIER_IFFSIF_CUSTOMIZER
Identifier for the customizer of
ILcdMS2525bCoded.sIFFSIF . |
static int |
TEXT_MODIFIER_MOVEMENT_DIRECTION_CUSTOMIZER
Identifier for the customizer of
ILcdMS2525bCoded.sMovementDirection . |
static int |
TEXT_MODIFIER_QUANTITY_CUSTOMIZER
Identifier for the customizer of
ILcdMS2525bCoded.sQuantity . |
static int |
TEXT_MODIFIER_REINFORCED_OR_REDUCED_CUSTOMIZER
Identifier for the customizer of
ILcdMS2525bCoded.sReinforcedOrReduced . |
static int |
TEXT_MODIFIER_SIGNATURE_EQUIPMENT_CUSTOMIZER
Identifier for the customizer of
ILcdMS2525bCoded.sSignatureEquipment . |
static int |
TEXT_MODIFIER_SPEED_CUSTOMIZER
Identifier for the customizer of
ILcdMS2525bCoded.sSpeedLabel . |
static int |
TEXT_MODIFIER_STAFF_COMMENTS_CUSTOMIZER
Identifier for the customizer of
ILcdMS2525bCoded.sStaffComments . |
static int |
TEXT_MODIFIER_TYPE_CUSTOMIZER
Identifier for the customizer of
ILcdMS2525bCoded.sTypeLabel . |
static int |
TEXT_MODIFIER_UNIQUE_DESIGNATION_CUSTOMIZER
Identifier for the customizer of
ILcdMS2525bCoded.sUniqueDesignation . |
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor and Description |
---|
TLcdMS2525bObjectCustomizer()
Creates a new
TLcdMS2525bObjectCustomizer object. |
TLcdMS2525bObjectCustomizer(boolean aEnablePointFilter)
Creates a new
TLcdMS2525bObjectCustomizer object optionally enabled with a hierarchy
filter that only allows to use point-based symbology. |
TLcdMS2525bObjectCustomizer(boolean aEnablePointFilter,
ILcdStringTranslator aStringTranslator)
Creates a new
TLcdMS2525bObjectCustomizer object optionally enabled with a
hierarchy filter that only allows to use point-based symbology, and an
ILcdStringTranslator . |
TLcdMS2525bObjectCustomizer(ILcdFilter aFilter)
Creates a new
TLcdMS2525bObjectCustomizer object with a hierarchy filter. |
TLcdMS2525bObjectCustomizer(ILcdFilter aFilter,
ILcdStringTranslator aStringTranslator)
Creates a new
TLcdMS2525bObjectCustomizer object with a hierarchy filter and
an ILcdStringTranslator . |
TLcdMS2525bObjectCustomizer(ILcdFilter aFilter,
TLcdMS2525bObjectCustomizer.FilterType aFilterType,
ILcdStringTranslator aStringTranslator)
Creates a new
TLcdMS2525bObjectCustomizer object with a hierarchy filter and
an ILcdStringTranslator . |
TLcdMS2525bObjectCustomizer(ILcdStringTranslator aStringTranslator)
Creates a new
TLcdMS2525bObjectCustomizer object with an ILcdStringTranslator . |
Modifier and Type | Method and Description |
---|---|
protected Customizer |
createCustomizer(int aID)
Creates a child customizer for the property that is identified by the given ID.
|
protected ILcdFilter |
getHierarchyFilter()
Returns the filter that is to be used in the hierarchy customizer.
|
Object |
getObject()
Returns the object that is currently set to this customizer.
|
protected ILcdFilter |
getSIDCFilter()
Returns the filter that is to be used in the customizer.
|
protected void |
insertCustomizers(int[] aID,
Customizer[] aCustomizer)
Inserts and layouts the given child customizers into this customizer.
|
boolean |
isSelectionOk()
Returns true when the current selection in the customizer is valid.
|
void |
propertyChange(PropertyChangeEvent aEvent) |
void |
setEnabled(boolean aEnabled) |
void |
setObject(Object aObject)
The object to customize.
|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
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, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, 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, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
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, transferFocusDownCycle, validate, validateTree
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, 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, transferFocusBackward, transferFocusUpCycle
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addPropertyChangeListener, removePropertyChangeListener
public static final int AFFILIATION_CUSTOMIZER
public static final int STATUS_CUSTOMIZER
public static final int COUNTRY_CUSTOMIZER
public static final int ORDEROFBATTLE_CUSTOMIZER
public static final int DISPLAY_OPTION_CUSTOMIZER
public static final int INFORMATION_CUSTOMIZER
public static final int PREVIEW_CUSTOMIZER
public static final int ECHELON_CUSTOMIZER
public static final int HIERARCHY_CUSTOMIZER
public static final int TEXT_MODIFIER_UNIQUE_DESIGNATION_CUSTOMIZER
ILcdMS2525bCoded.sUniqueDesignation
.public static final int TEXT_MODIFIER_HIGHER_FORMATION_CUSTOMIZER
ILcdMS2525bCoded.sHigherFormation
.public static final int TEXT_MODIFIER_DATE_TIME_GROUP_CUSTOMIZER
ILcdMS2525bCoded.sDateTimeGroup
.public static final int TEXT_MODIFIER_STAFF_COMMENTS_CUSTOMIZER
ILcdMS2525bCoded.sStaffComments
.public static final int TEXT_MODIFIER_ADDITIONAL_INFORMATION_CUSTOMIZER
ILcdMS2525bCoded.sAdditionalInformation
.public static final int TEXT_MODIFIER_QUANTITY_CUSTOMIZER
ILcdMS2525bCoded.sQuantity
.public static final int TEXT_MODIFIER_REINFORCED_OR_REDUCED_CUSTOMIZER
ILcdMS2525bCoded.sReinforcedOrReduced
.public static final int TEXT_MODIFIER_EVALUATION_RATING_CUSTOMIZER
ILcdMS2525bCoded.sEvaluationRating
.public static final int TEXT_MODIFIER_COMBAT_EFFECTIVENESS_CUSTOMIZER
ILcdMS2525bCoded.sCombatEffectiveness
.public static final int TEXT_MODIFIER_SIGNATURE_EQUIPMENT_CUSTOMIZER
ILcdMS2525bCoded.sSignatureEquipment
.public static final int TEXT_MODIFIER_IFFSIF_CUSTOMIZER
ILcdMS2525bCoded.sIFFSIF
.public static final int TEXT_MODIFIER_MOVEMENT_DIRECTION_CUSTOMIZER
ILcdMS2525bCoded.sMovementDirection
.public static final int TEXT_MODIFIER_TYPE_CUSTOMIZER
ILcdMS2525bCoded.sTypeLabel
.public static final int TEXT_MODIFIER_ALTITUDE_DEPTH_CUSTOMIZER
ILcdMS2525bCoded.sAltitudeDepth
.public static final int TEXT_MODIFIER_SPEED_CUSTOMIZER
ILcdMS2525bCoded.sSpeedLabel
.public static final int TEXT_MODIFIER_EFFECTIVE_TIME_CUSTOMIZER
ILcdMS2525bCoded.sEffectiveTime
.public static final String PROPERTY_SELECTION_OK
public static final String PROPERTY_MS2525B_CODE_CHANGED
public static final String PROPERTY_MS2525B_HIERARCHY_CHANGED
public static final String PROPERTY_MS2525B_STYLE_CHANGED
public static final String PROPERTY_MS2525B_TEXT_MODIFIERS_CHANGED
public TLcdMS2525bObjectCustomizer()
TLcdMS2525bObjectCustomizer
object.public TLcdMS2525bObjectCustomizer(boolean aEnablePointFilter)
TLcdMS2525bObjectCustomizer
object optionally enabled with a hierarchy
filter that only allows to use point-based symbology.aEnablePointFilter
- whether a hierarchy filter should be enabled that only allows to use
point-based symbologypublic TLcdMS2525bObjectCustomizer(ILcdFilter aFilter)
TLcdMS2525bObjectCustomizer
object with a hierarchy filter.
The filter determines which symbols should be available in the customizer.aFilter
- An ILcdFilter
instance that determines which symbols
should be available in the hierarchy tree. The objects that the filter will receive are of type String
,
representing the hierarchy of a particular symbol (e.g. "1.X.1.1").
If null, no filter will be used.public TLcdMS2525bObjectCustomizer(ILcdStringTranslator aStringTranslator)
TLcdMS2525bObjectCustomizer
object with an ILcdStringTranslator
.
This ILcdStringTranslator
can be used for translating the text from the labels that
are present in the user interface.
The translate(String)
method in ILcdStringTranslator
will be invoked for the following String
objects:
aStringTranslator
- an ILcdStringTranslator
for translating text.
If null, no translator will be used.public TLcdMS2525bObjectCustomizer(boolean aEnablePointFilter, ILcdStringTranslator aStringTranslator)
TLcdMS2525bObjectCustomizer
object optionally enabled with a
hierarchy filter that only allows to use point-based symbology, and an
ILcdStringTranslator
. The ILcdStringTranslator
can be used for
translating the text from the labels that are present in the user interface.aEnablePointFilter
- whether a hierarchy filter should be enabled that only allows to use
point-based symbologyaStringTranslator
- an ILcdStringTranslator
for translating text. If null, no
translator will be used.public TLcdMS2525bObjectCustomizer(ILcdFilter aFilter, TLcdMS2525bObjectCustomizer.FilterType aFilterType, ILcdStringTranslator aStringTranslator)
TLcdMS2525bObjectCustomizer
object with a hierarchy filter and
an ILcdStringTranslator
. The filter determines which symbols should be available
in the customizer. The ILcdStringTranslator
can be used for translating the text from the labels that
are present in the user interface. See TLcdMS2525bObjectCustomizer(ILcdStringTranslator)
for a list of values for which the translator will be used.aFilter
- An ILcdFilter
instance that determines which symbols
should be available in the hierarchy tree. The objects that the filter will receive are of type String
,
representing the hierarchy or text representation of a particular symbol (e.g. "1.X.1.1" or "WO-DIDID---L---") according to aFilterType
.
If null, no filter will be used.aFilterType
- determines the type of the filter. Hierarchy or SIDCaStringTranslator
- an ILcdStringTranslator
for translating text.
If null, no translator will be used.public TLcdMS2525bObjectCustomizer(ILcdFilter aFilter, ILcdStringTranslator aStringTranslator)
TLcdMS2525bObjectCustomizer
object with a hierarchy filter and
an ILcdStringTranslator
. The filter determines which symbols should be available
in the customizer. The ILcdStringTranslator
can be used for translating the text from the labels that
are present in the user interface. See TLcdMS2525bObjectCustomizer(ILcdStringTranslator)
for a list of values for which the translator will be used.aFilter
- An ILcdFilter
instance that determines which symbols
should be available in the hierarchy tree. The objects that the filter will receive are of type String
,
representing the hierarchy of a particular symbol (e.g. "1.X.1.1").
If null, no filter will be used.aStringTranslator
- an ILcdStringTranslator
for translating text.
If null, no translator will be used.public void setEnabled(boolean aEnabled)
setEnabled
in class JComponent
public void setObject(Object aObject)
ILcdEditableMS2525bCoded
.
To be able to use style-related customizers, it should also implement the
ILcdMS2525bStyled
interface,setObject
in interface Customizer
aObject
- The object to customize. This should be an instance of
ILcdEditableMS2525bCoded
and optionally also an instance of
ILcdMS2525bStyled
.IllegalArgumentException
- when the supplied object is null, doesn't implement
ILcdEditableMS2525bCoded
or isn't a valid MIL-STD
2525b code.public void propertyChange(PropertyChangeEvent aEvent)
propertyChange
in interface PropertyChangeListener
public Object getObject()
ILcdEditableMS2525bCoded
.public boolean isSelectionOk()
protected Customizer createCustomizer(int aID)
This method can be overridden to create an own customizer for the given ID or to prevent its default customizer from being displayed by returning null.
Each customizer that is not null should comply with the following conditions:
Customizer
interface) the PropertyChangeListener
interface. JComponent
, as it will be
displayed in the GUI. TLcdMS2525bObjectCustomizer
instance. TLcdMS2525bObjectCustomizer
instance should be registered as a property change
listener on the customizer. aID
- The unique ID of a customizable property.protected void insertCustomizers(int[] aID, Customizer[] aCustomizer)
This method can be
overridden to implement a custom layout. The given Customizer
array contains all
the child customizers that are created using createCustomizer(int)
and that are
not null. These customizers are also JComponent
extensions. The integer
array contains the corresponding identifiers.
aID
- The corresponding identifiers for the customizer array
aCustomizer.aCustomizer
- The child customizers that must be layouted in this general customizer. Each
customizer is also a JComponent
.createCustomizer(int)
protected ILcdFilter getHierarchyFilter()
String
,
representing the hierarchy of a particular symbol (e.g. "1.X.1.1").protected ILcdFilter getSIDCFilter()
String
,
representing the SIDC of a particular symbol