當前位置: 首頁>>代碼示例>>Java>>正文


Java SwingTools.setEnabledRecursive方法代碼示例

本文整理匯總了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);
	}
}
 
開發者ID:transwarpio,項目名稱:rapidminer,代碼行數:19,代碼來源:OperatorTreeCellRenderer.java

示例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());
}
 
開發者ID:transwarpio,項目名稱:rapidminer,代碼行數:32,代碼來源:ManageDatabaseDriversDialog.java

示例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);
		}
	}
}
 
開發者ID:transwarpio,項目名稱:rapidminer,代碼行數:43,代碼來源:PlotConfigurationTreeCellRenderer.java

示例4: disableAllComponents

import com.rapidminer.gui.tools.SwingTools; //導入方法依賴的package包/類
public void disableAllComponents() {
	if (enabled) {
		SwingTools.setEnabledRecursive(this, false);
		enabled = false;
	}
}
 
開發者ID:transwarpio,項目名稱:rapidminer,代碼行數:7,代碼來源:AbstractConfigurationPanel.java

示例5: enableAllComponents

import com.rapidminer.gui.tools.SwingTools; //導入方法依賴的package包/類
public void enableAllComponents() {
	if (!enabled) {
		SwingTools.setEnabledRecursive(this, true);
		enabled = true;
	}
}
 
開發者ID:transwarpio,項目名稱:rapidminer,代碼行數:7,代碼來源:AbstractConfigurationPanel.java


注:本文中的com.rapidminer.gui.tools.SwingTools.setEnabledRecursive方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。