use of javax.swing.AbstractButton in project knime-core by knime.
the class PieProperties method addLabelDisplayListener.
/**
* @param listener the listener to listen if the label display policy has
* changed
*/
protected void addLabelDisplayListener(final ActionListener listener) {
final Enumeration<AbstractButton> buttons = m_labelDisplayPolicy.getElements();
while (buttons.hasMoreElements()) {
final AbstractButton button = buttons.nextElement();
button.addActionListener(listener);
}
}
use of javax.swing.AbstractButton in project knime-core by knime.
the class PieProperties method enableAggrMethodGroup.
/**
* @param enable <code>true</code> if the aggregation method group should
* be enabled
*/
protected void enableAggrMethodGroup(final boolean enable) {
final Enumeration<AbstractButton> buttons = m_aggrMethButtonGrp.getElements();
while (buttons.hasMoreElements()) {
final AbstractButton button = buttons.nextElement();
button.setEnabled(enable);
if (enable) {
button.setToolTipText(AggregationMethod.getMethod4Command(button.getActionCommand()).getToolTip());
} else {
button.setToolTipText(AGGREGATION_METHOD_DISABLE_TOOLTIP);
}
}
}
use of javax.swing.AbstractButton in project knime-core by knime.
the class AbstractHistogramProperties method addLabelOrientationListener.
/**
* @param listener the listener to listen if the label orientation has
* changed
*/
protected void addLabelOrientationListener(final ActionListener listener) {
final Enumeration<AbstractButton> buttons = m_labelOrientation.getElements();
while (buttons.hasMoreElements()) {
final AbstractButton button = buttons.nextElement();
button.addActionListener(listener);
}
}
use of javax.swing.AbstractButton in project knime-core by knime.
the class AbstractHistogramProperties method addLayoutListener.
/**
* @param listener the listener to listen if the layout has changed
*/
protected void addLayoutListener(final ActionListener listener) {
final Enumeration<AbstractButton> buttons = m_layoutDisplayPolicy.getElements();
while (buttons.hasMoreElements()) {
final AbstractButton button = buttons.nextElement();
button.addActionListener(listener);
}
}
use of javax.swing.AbstractButton in project knime-core by knime.
the class NameFilterPanel method loadConfiguration.
/**
* Updates this filter panel by removing all current selections from the include and exclude list. The include list
* will contains all column names from the spec afterwards.
*
* @param config to be loaded from
* @param names array of names to be included or excluded (preserve order)
*/
public void loadConfiguration(final NameFilterConfiguration config, final String[] names) {
final List<String> ins = Arrays.asList(config.getIncludeList());
final List<String> exs = Arrays.asList(config.getExcludeList());
if (supportsInvalidValues()) {
m_invalidIncludes = new ArrayList<String>(Arrays.asList(config.getRemovedFromIncludeList()));
m_invalidExcludes = new ArrayList<String>(Arrays.asList(config.getRemovedFromExcludeList()));
}
this.update(ins, exs, names);
switch(config.getEnforceOption()) {
case EnforceExclusion:
m_enforceExclusion.setSelected(true);
cleanInvalidValues();
break;
case EnforceInclusion:
m_enforceInclusion.setSelected(true);
cleanInvalidValues();
break;
}
m_patternPanel.loadConfiguration(config.getPatternConfig(), names);
setPatternFilterEnabled(config.isPatternFilterEnabled());
m_currentType = config.getType();
boolean typeOk = false;
Enumeration<AbstractButton> buttons = m_typeGroup.getElements();
while (buttons.hasMoreElements()) {
AbstractButton button = buttons.nextElement();
if (button.getActionCommand().equals(m_currentType)) {
button.setSelected(true);
typeOk = true;
break;
}
}
if (!typeOk) {
m_currentType = NameFilterConfiguration.TYPE;
m_nameButton.setSelected(true);
}
updateFilterPanel();
repaint();
}
Aggregations