|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.knime.base.node.viz.aggregation.util.GUIUtils
public final class GUIUtils
This class provides different methods which are used in multiple aggregation implementations mainly in the GUI creation.
| Field Summary | |
|---|---|
static String |
NO_ELEMENT_SELECTED_TEXT
This message is displayed in the details tab if no element is selected. |
| Method Summary | |
|---|---|
static ButtonGroup |
createButtonGroup(ButtonGroupEnumInterface[] elements,
ActionListener l)
|
static ButtonGroup |
createButtonGroup(ButtonGroupEnumInterface[] elements,
ButtonGroupEnumInterface defaultButton,
ActionListener l)
|
static Box |
createButtonGroupBox(ButtonGroup group,
boolean vertical,
String label,
boolean border)
|
static String |
createHTMLDetailData(List<? extends AggregationValModel> valModels)
|
static String |
createHTMLDetailData(List<? extends AggregationValModel> valModels,
double[] vals)
|
static String |
createHTMLTotalData(double[] vals)
|
static String |
createLabel(double aggrVal,
int noOfDigits,
AggregationMethod aggrMethod)
|
static String |
createLabel(double aggrVal,
int noOfDigits,
AggregationMethod aggrMethod,
ValueScale scale)
|
static Color |
generateDistinctColor(int idx,
int size)
Generates most distinct colors for neighbor indexes. |
static void |
setSliderLabels(JSlider slider,
int divisor,
boolean showDigitsAndTicks)
Sets the label of the given slider. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String NO_ELEMENT_SELECTED_TEXT
| Method Detail |
|---|
public static ButtonGroup createButtonGroup(ButtonGroupEnumInterface[] elements,
ActionListener l)
elements - the elements to create the button group for and selects
the last element which returns true as isDefault()l - the optional listener to add to each button of this group
public static ButtonGroup createButtonGroup(ButtonGroupEnumInterface[] elements,
ButtonGroupEnumInterface defaultButton,
ActionListener l)
elements - the elements to create the button group for and selects
the last element which returns true as isDefault()defaultButton - the default group element to select or
null if the enumeration default element should be selectedl - the optional listener to add to each button of this group
public static Box createButtonGroupBox(ButtonGroup group,
boolean vertical,
String label,
boolean border)
group - the button group to put in a swing boxvertical - if the group should be layout verticallabel - the label of the swing boxborder - true if the label should be displayed
in a surrounding border
public static String createLabel(double aggrVal,
int noOfDigits,
AggregationMethod aggrMethod)
aggrVal - the value to use as labelnoOfDigits - the number of digits if it's a floating point numberaggrMethod - the AggregationMethod
String label
public static String createLabel(double aggrVal,
int noOfDigits,
AggregationMethod aggrMethod,
ValueScale scale)
aggrVal - the value to use as labelnoOfDigits - the number of digits if it's a floating point numberaggrMethod - the AggregationMethodscale - the ValueScale
String labelpublic static String createHTMLDetailData(List<? extends AggregationValModel> valModels)
valModels - the values to create the details information for
public static String createHTMLDetailData(List<? extends AggregationValModel> valModels,
double[] vals)
valModels - the values to create the details information forvals - the value array to add the current count, value count and
sum to
public static String createHTMLTotalData(double[] vals)
vals - the array contains the total count, value count and sum
in this order
public static Color generateDistinctColor(int idx,
int size)
idx - the current indexsize - the total number of colors to generate
public static void setSliderLabels(JSlider slider,
int divisor,
boolean showDigitsAndTicks)
slider - the slider to labeldivisor - the steps are calculated
maxVal - minVal / divisorshowDigitsAndTicks - true if the ticks and their
labels should be displayed
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||