本文整理匯總了Java中com.rapidminer.gui.operatortree.actions.InfoOperatorAction類的典型用法代碼示例。如果您正苦於以下問題:Java InfoOperatorAction類的具體用法?Java InfoOperatorAction怎麽用?Java InfoOperatorAction使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
InfoOperatorAction類屬於com.rapidminer.gui.operatortree.actions包,在下文中一共展示了InfoOperatorAction類的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: getComponent
import com.rapidminer.gui.operatortree.actions.InfoOperatorAction; //導入依賴的package包/類
@Override
public Component getComponent() {
if (dockableComponent == null) {
JScrollPane scrollPane = new ExtendedJScrollPane(this);
scrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
scrollPane.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED);
scrollPane.setBorder(null);
dockableComponent = new JPanel(new BorderLayout());
JPanel toolBarPanel = new JPanel(new BorderLayout());
ViewToolBar toolBar = new ViewToolBar();
JToggleButton toggleExpertModeButton = mainFrame.TOGGLE_EXPERT_MODE_ACTION.createToggleButton();
toggleExpertModeButton.setText(null);
toolBar.add(toggleExpertModeButton);
Action infoOperatorAction = new InfoOperatorAction() {
private static final long serialVersionUID = 6758272768665592429L;
@Override
protected Operator getOperator() {
return mainFrame.getFirstSelectedOperator();
}
};
toolBar.add(infoOperatorAction);
JToggleButton enableOperatorButton = new ToggleActivationItem(mainFrame.getActions()).createToggleButton();
enableOperatorButton.setText(null);
toolBar.add(enableOperatorButton);
Action renameOperatorAction = new ResourceAction(true, "rename_in_processrenderer") {
{
setCondition(OPERATOR_SELECTED, MANDATORY);
}
private static final long serialVersionUID = -3104160320178045540L;
@Override
public void actionPerformed(ActionEvent e) {
Operator operator = mainFrame.getFirstSelectedOperator();
String name = SwingTools.showInputDialog("rename_operator", operator.getName());
if (name != null && name.length() > 0) {
operator.rename(name);
}
}
};
toolBar.add(renameOperatorAction);
toolBar.add(new DeleteOperatorAction());
breakpointButton.addToToolBar(toolBar);
// toolBar.add(mainFrame.getActions().MAKE_DIRTY_ACTION);
toolBarPanel.add(toolBar, BorderLayout.NORTH);
JPanel headerPanel = new JPanel();
headerPanel.setBackground(SwingTools.LIGHTEST_BLUE);
headerPanel.add(headerLabel);
headerPanel.setBorder(BorderFactory.createMatteBorder(0, 0, 1, 0, Color.LIGHT_GRAY));
toolBarPanel.add(headerPanel, BorderLayout.SOUTH);
dockableComponent.add(toolBarPanel, BorderLayout.NORTH);
dockableComponent.add(scrollPane, BorderLayout.CENTER);
//compatibility level and warnings
JPanel southPanel = new JPanel(new BorderLayout());
southPanel.add(expertModeHintLabel, BorderLayout.CENTER);
compatibilityLabel.setLabelFor(compatibilityLevelSpinner);
compatibilityLevelSpinner.setPreferredSize(new Dimension(80, (int) compatibilityLevelSpinner.getPreferredSize().getHeight()));
compatibilityPanel.add(compatibilityLabel);
compatibilityPanel.add(compatibilityLevelSpinner);
southPanel.add(compatibilityPanel, BorderLayout.SOUTH);
dockableComponent.add(southPanel, BorderLayout.SOUTH);
}
return dockableComponent;
}