|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectchart.Filter
public class Filter
Provides the possibility to filter the Designs on a Chart.
Filtered Designs are not displayed on he Chart anymore, or are displayed in a different color than the unfiltered Designs.
Each filter is a small triangular draggable symbol on an Axis. Each Axis has two filters, an upper Filter and a lower Filter. The upper Filter is used to filter out all Designs that have a larger value than the Filter value for the Parameter represented by the Filter's Axis. Accordingly, the lower Filter is used to filter out all Designs that have a lower value than the Filter value for the Parameter represented by the Filter's Axis.
The behavior described above changes when
Chart
,
Axis
,
Parameter
,
Design
,
Serialized FormField Summary | |
---|---|
static int |
LOWER_FILTER
Constant that described a lower filter. |
static int |
UPPER_FILTER
Constant that describes an upper filter. |
Constructor Summary | |
---|---|
Filter(DataSheet dataSheet,
Axis axis,
int filterType)
Instantiates a new filter. |
Method Summary | |
---|---|
void |
apply()
Applies the Filter to all designs. |
Axis |
getAxis()
Gets the axis to which the Filter belongs. |
int |
getFilterType()
Gets the filter type. |
int |
getHighestPos()
Gets the highest position that this Filter may reach. |
int |
getLowestPos()
Gets the lowest position that this Filter may reach. |
double |
getValue()
Gets the current value of this Filter. |
int |
getXPos()
Gets the x position of this Filter on the Chart. |
int |
getYPos()
Gets the y position of this Filter on the Chart. |
void |
setValue(double value)
Sets the current value of this Filter. |
void |
setXPos(int pos)
Sets the x position of this Filter on the Chart. |
void |
setYPos(int pos)
Sets the y position of this Filter on the Chart. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int UPPER_FILTER
public static final int LOWER_FILTER
Constructor Detail |
---|
public Filter(DataSheet dataSheet, Axis axis, int filterType)
dataSheet
- the data sheetaxis
- the axis to which the Filter belongsfilterType
- the filter type: UPPER_FILTER, LOWER_FILTERMethod Detail |
---|
public double getValue()
public void setValue(double value)
Also calls applyToDesigns in order to make sure that the modified Filter positions is accounted for in the Filter states of all Designs.
value
- the new current value of this Filter.public int getXPos()
public void setXPos(int pos)
pos
- the new x position of this Filter on the Chart.public int getYPos()
public void setYPos(int pos)
Also calls applyToDesigns in order to make sure that the modified Filter positions is accounted for in the Filter states of all Designs.
pos
- the new y position of this Filter on the Chart.public int getHighestPos()
Used to make sure that a lower Filter is not dragged to a position above the upper Filter or outside the Axis range.
public int getLowestPos()
Used to make sure that a upper Filter is not dragged to a position below the lower Filter or outside the Axis range.
public int getFilterType()
public Axis getAxis()
public void apply()
This method has to be called every time this Filter value is modified. This allows to check the Filtering state of a Design with respect to a Filter only when there is actually a reason for checking rather then upon every repaint.
This implementation was chosen because the check if a design is filtered would become to CPU expensive otherwise because each Filter would have to be checked for each design every time the Chart is repainted.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |