public class TLcdAPP6AObjectCustomizer extends JPanel implements Customizer, PropertyChangeListener
ILcdEditableAPP6ACoded
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:
TLcdAPP6AObjectCustomizer.AFFILIATION_CUSTOMIZER
TLcdAPP6AObjectCustomizer.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 APP-6 API:
TLcdEditableAPP6AObject
, the symbology standard
is retrieved through TLcdEditableAPP6AObject.getAPP6Standard()
,ILcdEditableAPP6ACoded
, the symbology standard
is based upon the boolean System property com.luciad.symbology.app6a.app6b
.Modifier and Type | Class and Description |
---|---|
static class |
TLcdAPP6AObjectCustomizer.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_APP6A_CODE_CHANGED
When the APP-6A code is changed in the customizer, a PROPERTY_APP6A_CODE_CHANGED event is
passed to the property change listeners.
|
static String |
PROPERTY_APP6A_HIERARCHY_CHANGED
When the APP-6A hierarchy is changed in the customizer, a PROPERTY_APP6A_HIERARCHY_CHANGED
event is passed to the property change listeners.
|
static String |
PROPERTY_APP6A_STYLE_CHANGED
When the APP-6A style (the outlining property) is changed in the customizer a
PROPERTY_APP6A_STYLE_CHANGED event is passed to the property change listeners.
|
static String |
PROPERTY_APP6A_TEXT_MODIFIERS_CHANGED
When one or more text modifiers are changed in the customizer, a
PROPERTY_APP6A_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
ILcdAPP6ACoded.sAdditionalInformation . |
static int |
TEXT_MODIFIER_ALTITUDE_DEPTH_CUSTOMIZER
Identifier for the customizer of
ILcdAPP6ACoded.sAltitudeDepth . |
static int |
TEXT_MODIFIER_COMBAT_EFFECTIVENESS_CUSTOMIZER
Identifier for the customizer of
ILcdAPP6ACoded.sCombatEffectiveness . |
static int |
TEXT_MODIFIER_DATE_TIME_GROUP_CUSTOMIZER
Identifier for the customizer of
ILcdAPP6ACoded.sDateTimeGroup . |
static int |
TEXT_MODIFIER_EFFECTIVE_TIME_CUSTOMIZER
Identifier for the customizer of
ILcdAPP6ACoded.sEffectiveTime . |
static int |
TEXT_MODIFIER_EVALUATION_RATING_CUSTOMIZER
Identifier for the customizer of
ILcdAPP6ACoded.sEvaluationRating . |
static int |
TEXT_MODIFIER_HIGHER_FORMATION_CUSTOMIZER
Identifier for the customizer of
ILcdAPP6ACoded.sHigherFormation . |
static int |
TEXT_MODIFIER_IFFSIF_CUSTOMIZER
Identifier for the customizer of
ILcdAPP6ACoded.sIFFSIF . |
static int |
TEXT_MODIFIER_MOVEMENT_DIRECTION_CUSTOMIZER
Identifier for the customizer of
ILcdAPP6ACoded.sMovementDirection . |
static int |
TEXT_MODIFIER_QUANTITY_OF_EQUIPMENT_CUSTOMIZER
Identifier for the customizer of
ILcdAPP6ACoded.sQuantityOfEquipment . |
static int |
TEXT_MODIFIER_REINFORCED_OR_REDUCED_CUSTOMIZER
Identifier for the customizer of
IILcdAPP6ACoded.sReinforcedOrReduced . |
static int |
TEXT_MODIFIER_SIGNATURE_EQUIPMENT_CUSTOMIZER
Identifier for the customizer of
ILcdAPP6ACoded.sSignatureEquipment . |
static int |
TEXT_MODIFIER_SPEED_CUSTOMIZER
Identifier for the customizer of
ILcdAPP6ACoded.sSpeedLabel . |
static int |
TEXT_MODIFIER_STAFF_COMMENTS_CUSTOMIZER
Identifier for the customizer of
ILcdAPP6ACoded.sStaffComments . |
static int |
TEXT_MODIFIER_TYPE_OF_EQUIPMENT_CUSTOMIZER
Identifier for the customizer of
ILcdAPP6ACoded.sTypeOfEquipment . |
static int |
TEXT_MODIFIER_UNIQUE_DESIGNATION_CUSTOMIZER
Identifier for the customizer of
ILcdAPP6ACoded.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 |
---|
TLcdAPP6AObjectCustomizer()
Creates a new
TLcdAPP6AObjectCustomizer object. |
TLcdAPP6AObjectCustomizer(boolean aEnablePointFilter)
Creates a new
TLcdAPP6AObjectCustomizer object optionally enabled with a hierarchy
filter that only allows to use point-based symbology. |
TLcdAPP6AObjectCustomizer(boolean aEnablePointFilter,
ILcdStringTranslator aStringTranslator)
Creates a new
TLcdAPP6AObjectCustomizer object optionally enabled with a
hierarchy filter that only allows to use point-based symbology, and an
ILcdStringTranslator . |
TLcdAPP6AObjectCustomizer(ILcdFilter aFilter)
Creates a new
TLcdAPP6AObjectCustomizer object with a hierarchy filter. |
TLcdAPP6AObjectCustomizer(ILcdFilter aFilter,
ILcdStringTranslator aStringTranslator)
Creates a new
TLcdAPP6AObjectCustomizer object with a hierarchy filter and
an ILcdStringTranslator . |
TLcdAPP6AObjectCustomizer(ILcdFilter aFilter,
TLcdAPP6AObjectCustomizer.FilterType aFilterType,
ILcdStringTranslator aStringTranslator)
Creates a new
TLcdAPP6AObjectCustomizer object with a hierarchy filter and
an ILcdStringTranslator . |
TLcdAPP6AObjectCustomizer(ILcdStringTranslator aStringTranslator)
Creates a new
TLcdAPP6AObjectCustomizer 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
ILcdAPP6ACoded.sUniqueDesignation
.public static final int TEXT_MODIFIER_HIGHER_FORMATION_CUSTOMIZER
ILcdAPP6ACoded.sHigherFormation
.public static final int TEXT_MODIFIER_DATE_TIME_GROUP_CUSTOMIZER
ILcdAPP6ACoded.sDateTimeGroup
.public static final int TEXT_MODIFIER_STAFF_COMMENTS_CUSTOMIZER
ILcdAPP6ACoded.sStaffComments
.public static final int TEXT_MODIFIER_ADDITIONAL_INFORMATION_CUSTOMIZER
ILcdAPP6ACoded.sAdditionalInformation
.public static final int TEXT_MODIFIER_QUANTITY_OF_EQUIPMENT_CUSTOMIZER
ILcdAPP6ACoded.sQuantityOfEquipment
.public static final int TEXT_MODIFIER_REINFORCED_OR_REDUCED_CUSTOMIZER
IILcdAPP6ACoded.sReinforcedOrReduced
.public static final int TEXT_MODIFIER_EVALUATION_RATING_CUSTOMIZER
ILcdAPP6ACoded.sEvaluationRating
.public static final int TEXT_MODIFIER_COMBAT_EFFECTIVENESS_CUSTOMIZER
ILcdAPP6ACoded.sCombatEffectiveness
.public static final int TEXT_MODIFIER_SIGNATURE_EQUIPMENT_CUSTOMIZER
ILcdAPP6ACoded.sSignatureEquipment
.public static final int TEXT_MODIFIER_IFFSIF_CUSTOMIZER
ILcdAPP6ACoded.sIFFSIF
.public static final int TEXT_MODIFIER_MOVEMENT_DIRECTION_CUSTOMIZER
ILcdAPP6ACoded.sMovementDirection
.public static final int TEXT_MODIFIER_TYPE_OF_EQUIPMENT_CUSTOMIZER
ILcdAPP6ACoded.sTypeOfEquipment
.public static final int TEXT_MODIFIER_ALTITUDE_DEPTH_CUSTOMIZER
ILcdAPP6ACoded.sAltitudeDepth
.public static final int TEXT_MODIFIER_SPEED_CUSTOMIZER
ILcdAPP6ACoded.sSpeedLabel
.public static final int TEXT_MODIFIER_EFFECTIVE_TIME_CUSTOMIZER
ILcdAPP6ACoded.sEffectiveTime
.public static final String PROPERTY_SELECTION_OK
public static final String PROPERTY_APP6A_CODE_CHANGED
public static final String PROPERTY_APP6A_HIERARCHY_CHANGED
public static final String PROPERTY_APP6A_STYLE_CHANGED
public static final String PROPERTY_APP6A_TEXT_MODIFIERS_CHANGED
public TLcdAPP6AObjectCustomizer()
TLcdAPP6AObjectCustomizer
object.public TLcdAPP6AObjectCustomizer(boolean aEnablePointFilter)
TLcdAPP6AObjectCustomizer
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 TLcdAPP6AObjectCustomizer(ILcdFilter aFilter)
TLcdAPP6AObjectCustomizer
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 TLcdAPP6AObjectCustomizer(ILcdStringTranslator aStringTranslator)
TLcdAPP6AObjectCustomizer
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 TLcdAPP6AObjectCustomizer(boolean aEnablePointFilter, ILcdStringTranslator aStringTranslator)
TLcdAPP6AObjectCustomizer
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 TLcdAPP6AObjectCustomizer(ILcdFilter aFilter, TLcdAPP6AObjectCustomizer.FilterType aFilterType, ILcdStringTranslator aStringTranslator)
TLcdAPP6AObjectCustomizer
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 TLcdAPP6AObjectCustomizer(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 TLcdAPP6AObjectCustomizer(ILcdFilter aFilter, ILcdStringTranslator aStringTranslator)
TLcdAPP6AObjectCustomizer
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 TLcdAPP6AObjectCustomizer(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)
ILcdEditableAPP6ACoded
.
To be able to use style-related customizers, it should also implement the ILcdAPP6AStyled
interface,setObject
in interface Customizer
aObject
- The object to customize. This should be an instance of ILcdEditableAPP6ACoded
and optionally also an instance of ILcdAPP6AStyled
.IllegalArgumentException
- when the supplied object is null, doesn't implement ILcdEditableAPP6ACoded
or isn't a valid APP-6 code.public Object getObject()
ILcdEditableAPP6ACoded
.public boolean isSelectionOk()
public void propertyChange(PropertyChangeEvent aEvent)
propertyChange
in interface PropertyChangeListener
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. TLcdAPP6AObjectCustomizer
instance. TLcdAPP6AObjectCustomizer
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