|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JTabbedPane
org.knime.base.node.viz.plotter.AbstractPlotterProperties
org.knime.base.node.viz.plotter.columns.TwoColumnProperties
public class TwoColumnProperties
Provides functionality to select the x and the y column to display.
Selects first and second column per default and allows the filtering of
a certain DataType and to fix some column to a certain value. The information
about the available columns and if they are compatible with the restricting
DataValue
s is taken from a
DataTableSpec
which has to be provided in the
update
methods:
update(DataTableSpec)
, update(DataTableSpec, int, int)
,
and updateRangeSpinner(DataColumnSpec, DataColumnSpec)
.
In addition the ranges for the x and y axis can be adapted, i.e. the minimum and maximum for each column can be adapted. The registration of listeners is wrapped by this class, corresponding methods are provided.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JTabbedPane |
---|
JTabbedPane.AccessibleJTabbedPane, JTabbedPane.ModelListener |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary | |
---|---|
static int |
COMPONENT_WIDTH
Layout constant (combobox width, etc). |
protected ColumnSelectionComboxBox |
m_xSelector
The x column selection box. |
protected ColumnSelectionComboxBox |
m_ySelector
The y column selection box. |
static int |
SMALL_SPACE
Layout constant (space to the border). |
static int |
SPACE
Layout constant (space between elements). |
Fields inherited from class javax.swing.JTabbedPane |
---|
changeEvent, changeListener, model, SCROLL_TAB_LAYOUT, tabPlacement, WRAP_TAB_LAYOUT |
Fields inherited from class javax.swing.JComponent |
---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, 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 javax.swing.SwingConstants |
---|
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
TwoColumnProperties()
Creates a properties tab with the default properties ( AbstractPlotterProperties )
and a tab for the selection of two columns and the adjustment of their
ranges. |
|
TwoColumnProperties(Class<? extends DataValue>[] allowedXTypes,
Class<? extends DataValue>[] allowedYTypes)
Creates a properties tab with the default properties ( AbstractPlotterProperties )
and a tab for the selection of two columns and the adjustment of their
ranges, in addition, each column selection can be restricted to display
only columns which are compatible with certain
DataValue s. |
Method Summary | |
---|---|
void |
addXColumnListener(ItemListener listener)
|
void |
addXMaxListener(ChangeListener listener)
|
void |
addXMinListener(ChangeListener listener)
|
void |
addYColumnListener(ItemListener listener)
|
void |
addYMaxListener(ChangeListener listener)
|
void |
addYMinListener(ChangeListener listener)
|
DataColumnSpec |
getSelectedXColumn()
|
DataColumnSpec |
getSelectedYColumn()
|
double |
getXMaxValue()
|
double |
getXMinValue()
|
double |
getYMaxValue()
|
double |
getYMinValue()
|
void |
update(DataTableSpec spec)
Updates the selection boxes with the passed DataTableSpec and sets
0 and 1 as x and y. |
void |
update(DataTableSpec spec,
int xPreSelect,
int yPreSelect)
Updates the selection boxes with the new DataTableSpec and selects the passed
indices. |
protected void |
updateRangeSpinner(DataColumnSpec xColumn,
DataColumnSpec yColumn)
Updates the values of the range spinner acording to the current columns. |
Methods inherited from class org.knime.base.node.viz.plotter.AbstractPlotterProperties |
---|
getAntialiasButton, getChooseBackgroundButton, getColorChooser, getFitToScreenButton, getMouseSelectionBox |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int SPACE
public static final int SMALL_SPACE
public static final int COMPONENT_WIDTH
protected ColumnSelectionComboxBox m_xSelector
protected ColumnSelectionComboxBox m_ySelector
Constructor Detail |
---|
public TwoColumnProperties()
AbstractPlotterProperties
)
and a tab for the selection of two columns and the adjustment of their
ranges. There is no restriction on the displayed
DataValue
s.
public TwoColumnProperties(Class<? extends DataValue>[] allowedXTypes, Class<? extends DataValue>[] allowedYTypes)
AbstractPlotterProperties
)
and a tab for the selection of two columns and the adjustment of their
ranges, in addition, each column selection can be restricted to display
only columns which are compatible with certain
DataValue
s.
allowedXTypes
- allowed data types to be selecteable for the x
column.allowedYTypes
- allowed data types to be selectable for the y
columnMethod Detail |
---|
protected void updateRangeSpinner(DataColumnSpec xColumn, DataColumnSpec yColumn)
xColumn
- selected x columnyColumn
- selected y columnpublic void addXColumnListener(ItemListener listener)
listener
- the item listener for the x column box.public void addYColumnListener(ItemListener listener)
listener
- the item listener for the y column box.public DataColumnSpec getSelectedXColumn()
public DataColumnSpec getSelectedYColumn()
public void addXMinListener(ChangeListener listener)
listener
- for the x min value.public void addXMaxListener(ChangeListener listener)
listener
- for the x max value.public void addYMinListener(ChangeListener listener)
listener
- for the y min value.public void addYMaxListener(ChangeListener listener)
listener
- for the y min value.public double getXMinValue()
public double getXMaxValue()
public double getYMinValue()
public double getYMaxValue()
public void update(DataTableSpec spec)
DataTableSpec
and sets
0 and 1 as x and y.
spec
- the new DataTableSpec
public void update(DataTableSpec spec, int xPreSelect, int yPreSelect)
DataTableSpec
and selects the passed
indices.
spec
- the new data table spec.xPreSelect
- the x column index (-1 if unknown)yPreSelect
- the y column (-1 if unknown)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |