Package com.luciad.format.dafif.gui
Class TLcdDAFIFLoader
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
com.luciad.format.dafif.gui.TLcdDAFIFLoader
- All Implemented Interfaces:
ImageObserver,MenuContainer,Serializable,Accessible
This component can be used to control loading and unloading of DAFIF (or DAFIFT) data. It allows the
user to select the ICAO regions he would like to see for each type of DAFIF (or DAFIFT) data and update
the view accordingly.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class javax.swing.JPanel
JPanel.AccessibleJPanelNested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponentNested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainerNested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy -
Field Summary
Fields inherited from class javax.swing.JComponent
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOWFields inherited from class java.awt.Component
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTFields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH -
Constructor Summary
ConstructorsConstructorDescriptionTLcdDAFIFLoader(String aDAFIFRoot) Create a new loader panel instance.TLcdDAFIFLoader(String aDAFIFRoot, String aDecoderConfigFile, ALcdAISObjectFactory aDomainFactory) Deprecated.TLcdDAFIFLoader(String aDAFIFRoot, String aDecoderConfigFile, ALcdAISObjectFactory aDomainFactory, boolean aEnableSubTypeFiltering) Deprecated.TLcdDAFIFLoader(String aDAFIFRoot, String aDecoderConfigFile, ALcdAISObjectFactory aDomainFactory, boolean aEnableSubTypeFiltering, ILcdStringTranslator aTranslator) Deprecated.TLcdDAFIFLoader(String aDAFIFRoot, String aDecoderConfigFile, TLcdAISDataObjectFactory aDomainFactory) Create a new loader panel instance with the given arguments..TLcdDAFIFLoader(String aDAFIFRoot, String aDecoderConfigFile, TLcdAISDataObjectFactory aDomainFactory, boolean aEnableSubTypeFiltering) Create a new loader panel instance with the given arguments.TLcdDAFIFLoader(String aDAFIFRoot, String aDecoderConfigFile, TLcdAISDataObjectFactory aDomainFactory, boolean aEnableSubTypeFiltering, ILcdStringTranslator aTranslator) Create a new loader panel instance. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddDAFIFLoaderListener(ILcdDAFIFLoaderListener aListener) Adds anILcdDAFIFLoaderListenerto all DAFIF loaders used by this instance.voidaddStatusListener(ILcdStatusListener aListener) Adds anILcdStatusListenerto all DAFIF loaders used by this instance.voiddispose()Remove all currently loaded data and prepares the loader for being garbage collected.Returns the region chooser panel.getDAFIFTypeLoader(int index) Returns the DAFIF type loader at the specified index.intReturns the number of type loaders that exist within this DAFIF loader.All threads needing to synchronize access to the DAFIFLoader should use this lock.String[]getSelectedSubTypes(String aType) Returns the checked subTypes for a given type.String[]Returns the checked types.static booleanDeprecated.This method has been deprecated.voidmodelRemovedExternally(ILcdModel aModel) Signals that the given model has been removed by an external cause and that the current status of all DAFIF loaders should be updated.voidremoveDAFIFLoaderListener(ILcdDAFIFLoaderListener aListener) Removes the specified DAFIF loader listener.voidremoveStatusListener(ILcdStatusListener aListener) Removes the specified status listener.static voidsetClassTraceOn(boolean aClassTraceOn) Deprecated.This method has been deprecated.voidsetEnabled(boolean enabled) voidsetSelectedSubTypes(String aType, String[] aSubTypes) Sets the selected subtypes for a given type.voidsetSelectedTypes(String[] aTypes) Sets the specified types active.voidupdate()Updates the panel with data from the DAFIF source directory.Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUIMethods 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, 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, updateMethods 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, transferFocusDownCycle, validate, validateTreeMethods 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, 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, requestFocus, requestFocus, requestFocusInWindow, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
-
Constructor Details
-
TLcdDAFIFLoader
Create a new loader panel instance.- Parameters:
aDAFIFRoot- The source path for reading DAFIF data (split into regions).
-
TLcdDAFIFLoader
@Deprecated public TLcdDAFIFLoader(String aDAFIFRoot, String aDecoderConfigFile, ALcdAISObjectFactory aDomainFactory) Deprecated.Create a new loader panel instance with the given arguments..- Parameters:
aDAFIFRoot- The source path for reading DAFIF data (split into regions).aDecoderConfigFile- The config file containing which decoders to use.aDomainFactory- The domain factory to use for creating domain objects.- Throws:
IllegalArgumentException- when unsplitted DAFIF edition 7 data is loaded.
-
TLcdDAFIFLoader
public TLcdDAFIFLoader(String aDAFIFRoot, String aDecoderConfigFile, TLcdAISDataObjectFactory aDomainFactory) Create a new loader panel instance with the given arguments..- Parameters:
aDAFIFRoot- The source path for reading DAFIF data (split into regions).aDecoderConfigFile- The config file containing which decoders to use.aDomainFactory- The domain factory to use for creating domain objects.- Throws:
IllegalArgumentException- when unsplitted DAFIF edition 7 data is loaded.
-
TLcdDAFIFLoader
@Deprecated public TLcdDAFIFLoader(String aDAFIFRoot, String aDecoderConfigFile, ALcdAISObjectFactory aDomainFactory, boolean aEnableSubTypeFiltering) Deprecated.Create a new loader panel instance with the given arguments.- Parameters:
aDAFIFRoot- The source path for reading DAFIF data (split into regions).aDecoderConfigFile- The config file containing which decoders to use.aDomainFactory- The domain factory to use for creating domain objects.aEnableSubTypeFiltering- If subtype filtering functionality should be enabled in the loader panel.- Throws:
IllegalArgumentException- when unsplitted DAFIF edition 7 data is loaded.
-
TLcdDAFIFLoader
public TLcdDAFIFLoader(String aDAFIFRoot, String aDecoderConfigFile, TLcdAISDataObjectFactory aDomainFactory, boolean aEnableSubTypeFiltering) Create a new loader panel instance with the given arguments.- Parameters:
aDAFIFRoot- The source path for reading DAFIF data (split into regions).aDecoderConfigFile- The config file containing which decoders to use.aDomainFactory- The domain factory to use for creating domain objects.aEnableSubTypeFiltering- If subtype filtering functionality should be enabled in the loader panel.- Throws:
IllegalArgumentException- when unsplitted DAFIF edition 7 data is loaded.
-
TLcdDAFIFLoader
@Deprecated public TLcdDAFIFLoader(String aDAFIFRoot, String aDecoderConfigFile, ALcdAISObjectFactory aDomainFactory, boolean aEnableSubTypeFiltering, ILcdStringTranslator aTranslator) Deprecated.Create a new loader panel instance. TheILcdStringTranslatoris used to translate the label of the 'Update' button and the 'Types' in the user interface. It is also passed on to theTLcdDAFIFRegionChooser.- Parameters:
aDAFIFRoot- The source path for reading DAFIF data (split into regions).aDecoderConfigFile- The config file containing which decoders to use.aDomainFactory- The domain factory to use for creating domain objects.aEnableSubTypeFiltering- If subtype filtering functionality should be enabled in the loader panel.aTranslator- The string translator which will be used for translating strings.- Throws:
IllegalArgumentException- when unsplitted DAFIF edition 7 data is loaded.
-
TLcdDAFIFLoader
public TLcdDAFIFLoader(String aDAFIFRoot, String aDecoderConfigFile, TLcdAISDataObjectFactory aDomainFactory, boolean aEnableSubTypeFiltering, ILcdStringTranslator aTranslator) Create a new loader panel instance. TheILcdStringTranslatoris used to translate the label of the 'Update' button and the 'Types' in the user interface. It is also passed on to theTLcdDAFIFRegionChooser.- Parameters:
aDAFIFRoot- The source path for reading DAFIF data (split into regions).aDecoderConfigFile- The config file containing which decoders to use.aDomainFactory- The domain factory to use for creating domain objects.aEnableSubTypeFiltering- If subtype filtering functionality should be enabled in the loader panel.aTranslator- The string translator which will be used for translating strings.- Throws:
IllegalArgumentException- when unsplitted DAFIF edition 7 data is loaded.
-
-
Method Details
-
setEnabled
public void setEnabled(boolean enabled) - Overrides:
setEnabledin classJComponent
-
dispose
public void dispose()Remove all currently loaded data and prepares the loader for being garbage collected. Important note: An instance on which dispose() has been called, should no longer be used in any way. -
update
public void update()Updates the panel with data from the DAFIF source directory. -
getLoaderLock
All threads needing to synchronize access to the DAFIFLoader should use this lock. (Locking on the TLcdDAFIFLoader itself will potentially block the AWT-thread, since the TLcdDAFIFLoader is a JPanel. This should be avoided.)- Returns:
- A lock object.
-
isClassTraceOn
public static boolean isClassTraceOn()Deprecated.This method has been deprecated. It is recommended to use the standard Java logging framework directly.Returnstrueif tracing is enabled for this class.- Returns:
- true if tracing is enabled for this class, false otherwise.
-
setClassTraceOn
public static void setClassTraceOn(boolean aClassTraceOn) Deprecated.This method has been deprecated. It is recommended to use the standard Java logging framework directly.Enables tracing for all instances of this class. If the argument istruethen all log messages are recorded, otherwise only the informative, warning and error messages are recorded.- Parameters:
aClassTraceOn- if true then all log messages are recorded, otherwise only the informative, warning and error messages are recorded.
-
modelRemovedExternally
Signals that the given model has been removed by an external cause and that the current status of all DAFIF loaders should be updated.- Parameters:
aModel- The model that has been removed.
-
addStatusListener
Adds anILcdStatusListenerto all DAFIF loaders used by this instance.- Parameters:
aListener- anILcdStatusListener
-
removeStatusListener
Removes the specified status listener.- Parameters:
aListener- anILcdStatusListener
-
addDAFIFLoaderListener
Adds anILcdDAFIFLoaderListenerto all DAFIF loaders used by this instance.- Parameters:
aListener- anILcdDAFIFLoaderListener
-
removeDAFIFLoaderListener
Removes the specified DAFIF loader listener.- Parameters:
aListener- anILcdDAFIFLoaderListener
-
getDAFIFRegionChooser
Returns the region chooser panel.- Returns:
- the region chooser panel.
-
getDAFIFTypeLoaderCount
public int getDAFIFTypeLoaderCount()Returns the number of type loaders that exist within this DAFIF loader.- Returns:
- The number of type loaders that exist within this DAFIF loader.
-
getDAFIFTypeLoader
Returns the DAFIF type loader at the specified index.- Parameters:
index- Indicates which type loader you want- Returns:
- The DAFIF type loader at the specified index.
-
setSelectedTypes
Sets the specified types active. This method allows you to programmatorically set the state of the check-boxes in the types list. All other types not included in the aTypes will be deselected.- Parameters:
aTypes- An array containing the names of the types you wish to select.
-
getSelectedTypes
Returns the checked types. This method allows you to retrieve the state of the check-boxes in the types list.- Returns:
- An array with the names of the types that are selected.
-
getSelectedSubTypes
Returns the checked subTypes for a given type. This method allows you to retrieve the state of the check-boxes in the subtypes list of a type.- Parameters:
aType- The type for which the selected subtypes will be returned.- Returns:
- An array with the names of the types that are selected.
-
setSelectedSubTypes
Sets the selected subtypes for a given type.- Parameters:
aType- The name of a type.aSubTypes- A list containing names of subtypes of aType, an empty list will clear the selection.
-