本文整理匯總了Java中com.rapidminer.gui.tools.components.ColorIcon類的典型用法代碼示例。如果您正苦於以下問題:Java ColorIcon類的具體用法?Java ColorIcon怎麽用?Java ColorIcon使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
ColorIcon類屬於com.rapidminer.gui.tools.components包,在下文中一共展示了ColorIcon類的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: ColorValueCellEditor
import com.rapidminer.gui.tools.components.ColorIcon; //導入依賴的package包/類
public ColorValueCellEditor(final ParameterTypeColor type) {
this.type = type;
button = new JButton("Choose Color...");
button.setToolTipText(type.getDescription());
button.setIconTextGap(6);
button.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
Color newColor = JColorChooser.showDialog(RapidMinerGUI.getMainFrame(), "Choose Color for " + type.getKey(),
((ColorIcon) button.getIcon()).getColor());
if (newColor != null) {
setEditorColor(newColor);
}
fireEditingStopped();
}
});
}
示例2: ColorValueCellEditor
import com.rapidminer.gui.tools.components.ColorIcon; //導入依賴的package包/類
public ColorValueCellEditor(final ParameterTypeColor type) {
this.type = type;
button = new JButton("Choose Color...");
button.setToolTipText(type.getDescription());
button.setIconTextGap(6);
button.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
Color newColor = JColorChooser.showDialog(RapidMinerGUI.getMainFrame(),
"Choose Color for " + type.getKey(),
((ColorIcon)button.getIcon()).getColor());
if (newColor != null)
setEditorColor(newColor);
fireEditingStopped();
}
});
}
示例3: setEditorColor
import com.rapidminer.gui.tools.components.ColorIcon; //導入依賴的package包/類
public void setEditorColor(Color color) {
button.setIcon(new ColorIcon(color));
}
示例4: getCellEditorValue
import com.rapidminer.gui.tools.components.ColorIcon; //導入依賴的package包/類
@Override
public Object getCellEditorValue() {
Color color = ((ColorIcon) button.getIcon()).getColor();
return color.getRed() + "," + color.getGreen() + "," + color.getBlue();
}
示例5: getCellEditorValue
import com.rapidminer.gui.tools.components.ColorIcon; //導入依賴的package包/類
public Object getCellEditorValue() {
Color color = ((ColorIcon)button.getIcon()).getColor();
return color.getRed() + "," + color.getGreen() + "," + color.getBlue();
}