本文整理汇总了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();
}