public class DataLimitsUnit
extends javax.swing.JPanel
implements com.lf.commons.model.ConfigurableUnit, com.lf.commons.dialog.options.OptionsUnit
javax.swing.JPanel.AccessibleJPanel
javax.swing.JComponent.AccessibleJComponent
Modifier and Type | Field and Description |
---|---|
static java.net.URL |
ICON_SMALL
Default unit icon.
|
protected boolean |
initialized
Components have been setup already?
|
protected java.util.Vector<java.awt.Component> |
matches
Remembers the components matching a search pattern for reset.
|
protected com.lf.commons.gui.DocumentValidator |
validatorBytes
Helper to set the dialog OK button state.
|
protected com.lf.commons.gui.DocumentValidator |
validatorNumeric
Helper to set the dialog OK button state.
|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Constructor and Description |
---|
DataLimitsUnit()
Constructor of this form.
|
Modifier and Type | Method and Description |
---|---|
void |
configureUnit(java.lang.String id,
com.lf.commons.config.Configuration config)
Restores values from persistent data stores.
|
protected void |
finalize()
Cares for proper cleanup after releasing the object.
|
int |
find(java.lang.String pattern)
Searches this unit for certain patterns specified by the user.
|
javax.swing.ImageIcon |
getBigIcon()
Provides the graphical icon of a certain size (normally 32x32 pixels).
|
java.awt.Component |
getComponent()
Provides the GUI component to be displayed.
|
static int |
getMaxFiles(java.lang.String id,
com.lf.commons.config.Configuration config,
int fallback)
Convenience getter for the maximum number of files to process.
|
static java.lang.String |
getMaxLength(java.lang.String id,
com.lf.commons.config.Configuration config,
java.lang.String fallback)
Convenience getter for the maximum amount of data to process.
|
javax.swing.ImageIcon |
getSmallIcon()
Provides the graphical icon of a certain size (normally 16x16 pixels).
|
java.lang.String |
getText()
Provides the text of the item to be displayed in the list of the
OptionsDialog . |
java.lang.String |
getTitle()
Provides the title of the item to be displayed on top of the
OptionsDialog . |
protected void |
init()
Initializes the GUI components.
|
boolean |
isInputValid()
Provides the info if the options of this unit are OK to be used.
|
boolean |
isModified()
Provides the info if the options of this unit have been changed.
|
void |
resetSearch(java.lang.String pattern)
Resets this unit so that the components do not highlight any search results.
|
static void |
setMaxFiles(java.lang.String id,
com.lf.commons.config.Configuration config,
int value)
Convenience setter for the maximum number of files to process.
|
static void |
setMaxLength(java.lang.String id,
com.lf.commons.config.Configuration config,
java.lang.String value)
Convenience setter for the maximum amount of data to process.
|
static void |
storeDefaultValues(java.lang.String id,
com.lf.commons.config.Configuration config,
int maxfiles,
java.lang.String maxlength)
Convenience method to populate the configuration with default values.
|
void |
storeUnit(java.lang.String id,
com.lf.commons.config.Configuration config)
Stores the current configuration values persistently.
|
void |
unitAdded(com.lf.commons.dialog.OptionsDialog parent,
java.lang.String id)
Informs the unit that it was added to the dialog.
|
void |
unitBecomesHidden()
Informs the unit that it will vanish from the screen (deselected).
|
void |
unitBecomesShown()
Informs the unit that it becomes visible on the screen (selected).
|
void |
unitIsHiding()
Informs the unit that it was made invisible by the manager (deselected).
|
void |
unitIsShowing()
Informs the unit that it was made visible by the manager (selected).
|
void |
unitRegistered(com.lf.commons.model.ApplicationModel model,
java.lang.String id)
Informs the configurable unit that it was registered with a model.
|
void |
unitRemoved(com.lf.commons.dialog.OptionsDialog parent,
java.lang.String id)
Informs the unit that it was removed from the tabbed window.
|
void |
unitUnregistered(com.lf.commons.model.ApplicationModel model,
java.lang.String id)
Informs the configurable unit that it was unregistered with a model.
|
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, 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, setEnabled, 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, 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, transferFocusBackward, transferFocusUpCycle
public static java.net.URL ICON_SMALL
protected boolean initialized
protected java.util.Vector<java.awt.Component> matches
protected com.lf.commons.gui.DocumentValidator validatorNumeric
protected com.lf.commons.gui.DocumentValidator validatorBytes
protected void init()
protected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable
public void configureUnit(java.lang.String id, com.lf.commons.config.Configuration config)
configureUnit
in interface com.lf.commons.model.ConfigurableUnit
id
- The unique identifier for the instanceconfig
- The configurationpublic void storeUnit(java.lang.String id, com.lf.commons.config.Configuration config)
storeUnit
in interface com.lf.commons.model.ConfigurableUnit
id
- The unique identifier for the instanceconfig
- The configurationpublic static void storeDefaultValues(java.lang.String id, com.lf.commons.config.Configuration config, int maxfiles, java.lang.String maxlength)
id
- The unique identifier for the instanceconfig
- The configurationmaxfiles
- The maximum number of filesmaxlength
- The maximum amount of data, numeric or e.g. "1G"java.lang.NullPointerException
- If a parameter is null
public void unitRegistered(com.lf.commons.model.ApplicationModel model, java.lang.String id)
unitRegistered
in interface com.lf.commons.model.ConfigurableUnit
model
- The application modelid
- The unique identifier for the instancepublic void unitUnregistered(com.lf.commons.model.ApplicationModel model, java.lang.String id)
unitUnregistered
in interface com.lf.commons.model.ConfigurableUnit
model
- The application modelid
- The unique identifier for the instancepublic java.lang.String getText()
OptionsDialog
.
getText
in interface com.lf.commons.dialog.options.OptionsUnit
public javax.swing.ImageIcon getBigIcon()
getBigIcon
in interface com.lf.commons.dialog.options.OptionsUnit
public javax.swing.ImageIcon getSmallIcon()
getSmallIcon
in interface com.lf.commons.dialog.options.OptionsUnit
public java.lang.String getTitle()
OptionsDialog
.
getTitle
in interface com.lf.commons.dialog.options.OptionsUnit
public java.awt.Component getComponent()
getComponent
in interface com.lf.commons.dialog.options.OptionsUnit
null
indicates folder functionalitypublic int find(java.lang.String pattern)
find
in interface com.lf.commons.dialog.options.OptionsUnit
pattern
- The search patternpublic void resetSearch(java.lang.String pattern)
resetSearch
in interface com.lf.commons.dialog.options.OptionsUnit
pattern
- The search patternpublic boolean isModified()
isModified
in interface com.lf.commons.dialog.options.OptionsUnit
public boolean isInputValid()
isInputValid
in interface com.lf.commons.dialog.options.OptionsUnit
public void unitAdded(com.lf.commons.dialog.OptionsDialog parent, java.lang.String id)
unitAdded
in interface com.lf.commons.dialog.options.OptionsUnit
parent
- The dialogid
- The unique IDpublic void unitRemoved(com.lf.commons.dialog.OptionsDialog parent, java.lang.String id)
unitRemoved
in interface com.lf.commons.dialog.options.OptionsUnit
parent
- The dialogid
- The unique IDpublic void unitBecomesShown()
unitBecomesShown
in interface com.lf.commons.dialog.options.OptionsUnit
public void unitBecomesHidden()
unitBecomesHidden
in interface com.lf.commons.dialog.options.OptionsUnit
public void unitIsShowing()
unitIsShowing
in interface com.lf.commons.dialog.options.OptionsUnit
public void unitIsHiding()
unitIsHiding
in interface com.lf.commons.dialog.options.OptionsUnit
public static int getMaxFiles(java.lang.String id, com.lf.commons.config.Configuration config, int fallback)
id
- The unit IDconfig
- The cachefallback
- Default valuepublic static void setMaxFiles(java.lang.String id, com.lf.commons.config.Configuration config, int value)
id
- The unit IDconfig
- The cachevalue
- The valuepublic static java.lang.String getMaxLength(java.lang.String id, com.lf.commons.config.Configuration config, java.lang.String fallback)
id
- The unit IDconfig
- The cachefallback
- Default value, numeric or "1G"public static void setMaxLength(java.lang.String id, com.lf.commons.config.Configuration config, java.lang.String value)
id
- The unit IDconfig
- The cachevalue
- The value, numeric or "1G"Copyright © 2005-2015 Leisenfels UG. All rights reserved.