|
||||||||||
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.jstatcom.model.ModelPanel com.jstatcom.ts.TSSel
public final class TSSel
Configurable selection tool for time series. It manages the selection of endogenous, exogenous and deterministic variables and builds the corresponding data objects to be reused by other components via the symboltable. Selection is only allowed for series with the same periodicity and at least 2 observations time overlap.
If the underlying symbols are referenced, JSCTypeDef
objects
with the correct types should be specified for the corresponding data:
JSCTypes.DRANGE
JSCTypes.SARRAY
JSCTypes.SARRAY
JSCTypes.SARRAY
JSCTypes.SARRAY
JSCTypes.NARRAY
JSCTypes.NARRAY
JSCTypes.NARRAY
JSCTypes.NARRAY
It can be configured by specifying several selection options as well as the names of the various data objects.
Data objects are only created if the respective name has been specified. The selected data is automatically truncated if there are missings at the beginning or the end. The objects are created and stored in the following order:
The ordering might be important when installing symbol listeners. If the listener reacts to a change in a variable, then it should only reference variables that have been created before, e.g. a listener to "all data" can reference "all names" in its action method, but not vice versa. When "all names" changes, "all data" is still empty.
A save way around this problem is to install a listener to the selectionChanged
property of the TSSel
. A PropertyChangeEvent
for "selectionChanged" is fired
only after all data objects have been created.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
javax.swing.JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Component |
---|
java.awt.Component.BaselineResizeBehavior |
Field Summary |
---|
Fields inherited from class javax.swing.JComponent |
---|
TOOL_TIP_TEXT_KEY, 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 | |
---|---|
TSSel()
Default constructor. |
Method Summary | |
---|---|
java.lang.String |
getAllDataName()
Gets the allDataName property (String) value. |
java.lang.String |
getAllStringsName()
Gets the allStringsName property (String) value. |
java.lang.String |
getDateRangeName()
Gets the dateRangeName property (String) value. |
boolean |
getDatesEditable()
|
java.lang.String |
getDeterministicDataName()
Gets the deterministicDataName property (String) value. |
boolean |
getDeterministicEnabled()
Gets whether deterministic series can be selected. |
java.lang.String |
getDeterministicStringsName()
Gets the deterministicStringsName property (String) value. |
java.lang.String |
getEndogenousDataName()
Gets the endogenousDataName property (String) value. |
java.lang.String |
getEndogenousStringsName()
Gets the endogenousStringsName property (String) value. |
java.lang.String |
getExogenousDataName()
Gets the exogenousDataName property (String) value. |
boolean |
getExogenousEnabled()
Gets whether exogenous series can be selected. |
java.lang.String |
getExogenousStringsName()
Gets the exogenousStringsName property (String) value. |
Selection |
getSelection()
Gets the current selection set by this component. |
int |
getSelectionMode()
Gets the current selection mode. |
boolean |
isCheckNaN()
Gets whether it is checked whether missing values are in the selection. |
boolean |
isOneEndogenousOnly()
|
boolean |
isUpperScope()
Gets whether Scope.UPPER or Scope.GLOBAL is
used. |
void |
setAllDataName(java.lang.String allDataName)
Sets the name of the object holding the data array for all series. |
void |
setAllStringsName(java.lang.String allStringsName)
Sets the name of dataobject that holds the string array of all names. |
void |
setCheckNaN(boolean checkNaN)
Sets whether it is checked whether missing values are in the selection. |
void |
setDateRangeName(java.lang.String dateRangeName)
Sets the name of dataobject that holds the date range of the selected series. |
void |
setDatesEditable(boolean newDatesEditable)
Enables/disables editing of date range. |
void |
setDeterministicDataName(java.lang.String deterministicDataName)
Sets the name of the object holding the deterministic data array. |
void |
setDeterministicEnabled(boolean arg1)
Enables/disables the selection of deterministic variables. |
void |
setDeterministicStringsName(java.lang.String deterministicStringsName)
Sets the name of dataobject that holds the string array of deterministic names. |
void |
setEnabled(boolean enabled)
Enables/disables the component. |
void |
setEndogenousDataName(java.lang.String endogenousDataName)
Sets the name of the object holding the endogenous data array. |
void |
setEndogenousStringsName(java.lang.String endogenousStringsName)
Sets the name of dataobject that holds the string array of endogenous names. |
void |
setExogenousDataName(java.lang.String exogenousDataName)
Sets the name of the object holding the exogenous data array. |
void |
setExogenousEnabled(boolean arg1)
Enables/disables selection of exogenous variables. |
void |
setExogenousStringsName(java.lang.String exogenousStringsName)
Sets the name of dataobject that holds the string array of exogenous names. |
void |
setOneEndogenousOnly(boolean newOneEndogenousOnly)
Sets whether only one endogenous variable should be selectable or more. |
void |
setSelection(Selection sel)
Sets the selection of this component according to sel . |
void |
setSelectionChanged()
Sets the selection changed property and fires PropertyChangeEvent if the value changed. |
void |
setSelectionMode(int selectionMode)
Sets the selection mode to be a valid mode for JList . |
void |
setUpperScope(boolean isUpper)
Sets whether UPPER or default GLOBAL scope
should be used. |
Methods inherited from class com.jstatcom.model.ModelPanel |
---|
addNotify, findParentScope, global, local, shown, upper |
Methods inherited from class javax.swing.JPanel |
---|
getAccessibleContext, getUI, getUIClassID, setUI, updateUI |
Methods inherited from class javax.swing.JComponent |
---|
addAncestorListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, 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, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, 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, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
Methods inherited from class java.awt.Container |
---|
add, add, add, add, add, addContainerListener, 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, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate |
Methods inherited from class java.awt.Component |
---|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, createImage, createImage, createVolatileImage, createVolatileImage, dispatchEvent, enable, enableInputMethods, 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, 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 |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public TSSel()
Method Detail |
---|
public java.lang.String getAllDataName()
setAllDataName(java.lang.String)
public java.lang.String getAllStringsName()
setAllStringsName(java.lang.String)
public boolean getDatesEditable()
setDatesEditable(boolean)
public java.lang.String getDeterministicDataName()
setDeterministicDataName(java.lang.String)
public boolean getDeterministicEnabled()
setDeterministicEnabled(boolean)
public java.lang.String getDeterministicStringsName()
setDeterministicStringsName(java.lang.String)
public java.lang.String getEndogenousDataName()
setEndogenousDataName(java.lang.String)
public java.lang.String getEndogenousStringsName()
setEndogenousStringsName(java.lang.String)
public java.lang.String getExogenousDataName()
setExogenousDataName(java.lang.String)
public java.lang.String getDateRangeName()
setDateRangeName(java.lang.String)
public boolean getExogenousEnabled()
setExogenousEnabled(boolean)
public java.lang.String getExogenousStringsName()
setExogenousStringsName(java.lang.String)
public int getSelectionMode()
JList
selection modepublic boolean isOneEndogenousOnly()
setOneEndogenousOnly(boolean)
public void setAllDataName(java.lang.String allDataName)
allDataName
- The new value for the property.
java.lang.IllegalArgumentException
- if argument is not a valid symbolnamegetAllDataName()
public void setAllStringsName(java.lang.String allStringsName)
allStringsName
- The new value for the property.
java.lang.IllegalArgumentException
- if argument is not a valid symbolnamegetAllStringsName()
public void setDatesEditable(boolean newDatesEditable)
newDatesEditable
- true to enable range editingpublic void setDeterministicDataName(java.lang.String deterministicDataName)
deterministicDataName
- The new value for the property.
java.lang.IllegalArgumentException
- if argument is not a valid symbolnamegetDeterministicDataName()
public void setDeterministicEnabled(boolean arg1)
enabled
or disabled
. It has no effect on
the data creation, but it should communicate to the user, that
deterministic variables are ignored in the respective modeling context.
arg1
- true to enable selection of determinisic variablespublic void setDeterministicStringsName(java.lang.String deterministicStringsName)
deterministicStringsName
- The new value for the property.
java.lang.IllegalArgumentException
- if argument is not a valid symbolnamegetDeterministicStringsName()
public void setEnabled(boolean enabled)
setEnabled
in class javax.swing.JComponent
enabled
- booleanpublic void setEndogenousDataName(java.lang.String endogenousDataName)
endogenousDataName
- The new value for the property.
java.lang.IllegalArgumentException
- if argument is not a valid symbolnamegetEndogenousDataName()
public void setEndogenousStringsName(java.lang.String endogenousStringsName)
endogenousStringsName
- The new value for the property.
java.lang.IllegalArgumentException
- if argument is not a valid symbolnamegetEndogenousStringsName()
public void setExogenousDataName(java.lang.String exogenousDataName)
exogenousDataName
- The new value for the property.
java.lang.IllegalArgumentException
- if argument is not a valid symbolnamegetExogenousDataName()
public void setExogenousEnabled(boolean arg1)
enabled
or disabled
. It has no effect on the data creation, but
it should communicate to the user, that exogenous variables are ignored
in the respective modeling context.
arg1
- true to enable selection of exogenous variablespublic void setExogenousStringsName(java.lang.String exogenousStringsName)
exogenousStringsName
- The new value for the property.
java.lang.IllegalArgumentException
- if argument is not a valid symbolnamegetExogenousStringsName()
public void setDateRangeName(java.lang.String dateRangeName)
dateRangeName
- The new value for the property.
java.lang.IllegalArgumentException
- if argument is not a valid symbolnamegetDateRangeName()
public void setOneEndogenousOnly(boolean newOneEndogenousOnly)
newOneEndogenousOnly
- true if only one endogenous variable should be selectablepublic void setSelectionChanged()
PropertyChangeEvent
if the value changed.
public void setSelectionMode(int selectionMode)
JList
.
selectionMode
- intpublic void setUpperScope(boolean isUpper)
UPPER
or default GLOBAL
scope
should be used.
isUpper
- if true Scope.UPPER
is used, otherwise
Scope.GLOBAL
public boolean isUpperScope()
Scope.UPPER
or Scope.GLOBAL
is
used.
true
true Scope.UPPER
is used,
otherwise Scope.GLOBAL
public boolean isCheckNaN()
true
.
true
if NaN's are not allowedpublic void setCheckNaN(boolean checkNaN)
true
.
checkNaN
- true
if NaN's are not allowed,
false
series with missing values can be
selectedpublic void setSelection(Selection sel)
sel
.
The method does nothing if (sel == null)
.
sel
- holds the selectionpublic Selection getSelection()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |