本文整理汇总了Java中com.rapidminer.gui.tools.SwingTools.setEnabledRecursive方法的典型用法代码示例。如果您正苦于以下问题:Java SwingTools.setEnabledRecursive方法的具体用法?Java SwingTools.setEnabledRecursive怎么用?Java SwingTools.setEnabledRecursive使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.rapidminer.gui.tools.SwingTools
的用法示例。
在下文中一共展示了SwingTools.setEnabledRecursive方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getTreeCellRendererComponent
import com.rapidminer.gui.tools.SwingTools; //导入方法依赖的package包/类
@Override
public Component getTreeCellRendererComponent(JTree tree, Object value, boolean selected, boolean expanded,
boolean leaf, int row, boolean hasFocus) {
if (value instanceof Operator) {
operatorPanel.updateOperator(tree, (Operator) value, selected, hasFocus);
SwingTools.setEnabledRecursive(operatorPanel, operatorPanel.isEnabled());
return operatorPanel;
} else if (value instanceof ExecutionUnit) {
Component component = super.getTreeCellRendererComponent(tree, ((ExecutionUnit) value).getName(), selected,
expanded, leaf, row, hasFocus);
((JComponent) component).setBorder(SUBPROCESS_BORDER);
((JLabel) component).setIcon(SUBPROCESS_ICON);
SwingTools.setEnabledRecursive(component, tree.isEnabled());
return component;
} else {
return super.getTreeCellRendererComponent(tree, value, selected, expanded, leaf, row, hasFocus);
}
}
示例2: setProperties
import com.rapidminer.gui.tools.SwingTools; //导入方法依赖的package包/类
private void setProperties(JDBCProperties props) {
if(this.properties != props) {
this.save();
}
this.properties = props;
((DefaultComboBoxModel)this.classNameCombo.getModel()).removeAllElements();
if(props == null) {
SwingTools.setEnabledRecursive(this, false);
this.nameField.setText("");
this.urlprefixField.setText("");
this.portField.setText("");
this.classNameCombo.setSelectedItem("");
this.jarFileField.setText("");
this.dbseparatorField.setText("/");
} else {
this.nameField.setText(props.getName());
this.urlprefixField.setText(props.getUrlPrefix());
this.portField.setText(props.getDefaultPort());
this.classNameCombo.setSelectedItem(Tools.toString(props.getDriverClasses(), ","));
this.jarFileField.setText(props.getDriverJarFile());
this.dbseparatorField.setText(props.getDbNameSeperator());
if(props.isUserDefined()) {
SwingTools.setEnabledRecursive(this, true);
} else {
SwingTools.setEnabledRecursive(this, false);
}
}
ManageDatabaseDriversDialog.this.deleteButton.setEnabled(props != null && props.isUserDefined());
}
示例3: adaptContainerStyle
import com.rapidminer.gui.tools.SwingTools; //导入方法依赖的package包/类
private void adaptContainerStyle(JTree tree, Object node, boolean selected, boolean expanded, boolean leaf, int row,
boolean hasFocus, boolean dragging, boolean setForeground) {
SwingTools.setEnabledRecursive(this, tree.isEnabled());
Color fg = null;
Color bg = null;
boolean highlightingEnabled = RapidMinerGUI.getDragHighlighteMode().equals(DragHighlightMode.FULL);
JTree.DropLocation dropLocation = tree.getDropLocation();
if (dropLocation != null && dropLocation.getChildIndex() == -1
&& tree.getRowForPath(dropLocation.getPath()) == row) {
fg = TEXT_SELECTED_COLOR;
bg = SELECTED_COLOR;
} else if (selected && !dragging) {
fg = TEXT_SELECTED_COLOR;
bg = SELECTED_COLOR;
} else {
fg = TEXT_NON_SELECTED_COLOR;
if (highlightingEnabled && dragging) {
bg = ProcessDrawer.INNER_DRAG_COLOR;
} else {
bg = NOT_SELECTED_COLOR;
}
}
if (setForeground) {
nameLabel.setForeground(fg);
attributeLabel.setForeground(fg);
}
this.setBackground(bg);
if (hasFocus) {
this.setBorder(focusBorder);
} else {
if (highlightingEnabled && dragging) {
this.setBorder(draggingNotFocusedBorder);
} else {
this.setBorder(nonFocusBorder);
}
}
}
示例4: disableAllComponents
import com.rapidminer.gui.tools.SwingTools; //导入方法依赖的package包/类
public void disableAllComponents() {
if (enabled) {
SwingTools.setEnabledRecursive(this, false);
enabled = false;
}
}
示例5: enableAllComponents
import com.rapidminer.gui.tools.SwingTools; //导入方法依赖的package包/类
public void enableAllComponents() {
if (!enabled) {
SwingTools.setEnabledRecursive(this, true);
enabled = true;
}
}