本文整理汇总了Java中javax.swing.JSpinner.setToolTipText方法的典型用法代码示例。如果您正苦于以下问题:Java JSpinner.setToolTipText方法的具体用法?Java JSpinner.setToolTipText怎么用?Java JSpinner.setToolTipText使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类javax.swing.JSpinner
的用法示例。
在下文中一共展示了JSpinner.setToolTipText方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initialize
import javax.swing.JSpinner; //导入方法依赖的package包/类
public void initialize() {
JPanel edit = new JPanel(new GridLayout(4, 1, 0, 5));
stepsLabel = new JLabel("Steps:");
steps = new JSpinner(new SpinnerNumberModel(SPA.getNumberOfSteps(), 2, ParametricAnalysis.MAX_STEP_NUMBER, 1));
steps.setToolTipText("Sets the number of performed simulations");
edit.add(stepsLabel);
edit.add(steps);
edit.setPreferredSize(new Dimension(130, 108));
JPanel editLables = new JPanel(new GridLayout(4, 1, 0, 5));
editLables.add(stepsLabel);
editLables.setPreferredSize(new Dimension(100, 108));
JPanel editPanel = new JPanel();
editPanel.add(editLables);
editPanel.add(edit);
editPanel.setBorder(new EmptyBorder(10, 20, 0, 20));
JPanel cont = new JPanel(new BorderLayout());
title = new TitledBorder("Simulation seed variation");
cont.add(editPanel, BorderLayout.CENTER);
scroll = new JScrollPane(cont);
scroll.setBorder(title);
description = new JTextArea(DESCRIPTION);
description.setOpaque(false);
description.setEditable(false);
description.setLineWrap(true);
description.setWrapStyleWord(true);
descrPane = new JScrollPane(description);
descriptionTitle = new TitledBorder(new EtchedBorder(), "Description");
descrPane.setBorder(descriptionTitle);
descrPane.setMinimumSize(new Dimension(80, 0));
scroll.setMinimumSize(new Dimension(360, 0));
setLeftComponent(scroll);
setRightComponent(descrPane);
setListeners();
this.setBorder(new EmptyBorder(5, 0, 5, 0));
}
示例2: initialize
import javax.swing.JSpinner; //导入方法依赖的package包/类
public void initialize() {
JPanel edit = new JPanel(new GridLayout(4, 1, 0, 5));
stepsLabel = new JLabel("Steps (n. of exec.): ");
steps = new JSpinner(new SpinnerNumberModel(SPA.getNumberOfSteps(), 2, ParametricAnalysis.MAX_STEP_NUMBER, 1));
steps.setToolTipText("Sets the number of performed simulations");
edit.add(stepsLabel);
edit.add(steps);
edit.setPreferredSize(new Dimension(130, 88));
JPanel editLables = new JPanel(new GridLayout(4, 1, 0, 5));
editLables.add(stepsLabel);
editLables.setPreferredSize(new Dimension(100, 88));
JPanel editPanel = new JPanel();
editPanel.add(editLables);
editPanel.add(edit);
editPanel.setBorder(new EmptyBorder(10, 20, 0, 20));
JPanel cont = new JPanel(new BorderLayout());
title = new TitledBorder("Simulation seed variation");
cont.add(editPanel, BorderLayout.CENTER);
scroll = new JScrollPane(cont);
scroll.setBorder(title);
description = new JTextArea(DESCRIPTION);
description.setOpaque(false);
description.setEditable(false);
description.setLineWrap(true);
description.setWrapStyleWord(true);
descrPane = new JScrollPane(description);
descriptionTitle = new TitledBorder(new EtchedBorder(), "Description");
descrPane.setBorder(descriptionTitle);
descrPane.setMinimumSize(new Dimension(80, 0));
scroll.setMinimumSize(new Dimension(360, 0));
setLeftComponent(scroll);
setRightComponent(descrPane);
setListeners();
this.setBorder(new EmptyBorder(5, 0, 5, 0));
}
示例3: initialize
import javax.swing.JSpinner; //导入方法依赖的package包/类
public void initialize() {
JPanel edit = new JPanel(new GridLayout(4, 1, 0, 5));
fromLabel = new JLabel("Initial ß: ");
from = new JSpinner(new SpinnerNumberModel(PMPA.getInitialValue(), 0.000, 1.000, 0.001));
from.setToolTipText("Sets the initial proportion of jobs");
toLabel = new JLabel("Final ß: ");
to = new JSpinner(new SpinnerNumberModel(PMPA.getFinalValue(), 0.000, 1.000, 0.001));
to.setToolTipText("Sets the final proportion of jobs");
stepsLabel = new JLabel("Steps (n. of exec.): ");
int maxSteps = PMPA.searchForAvailableSteps();
if (maxSteps > ParametricAnalysis.MAX_STEP_NUMBER) {
maxSteps = ParametricAnalysis.MAX_STEP_NUMBER;
}
steps = new JSpinner(new SpinnerNumberModel(PMPA.getNumberOfSteps(), 2, maxSteps, 1));
steps.setToolTipText("Sets the number of steps to be performed");
Vector<Object> classes = cd.getClosedClassKeys();
String[] classNames = new String[classes.size()];
for (int i = 0; i < classes.size(); i++) {
classNames[i] = cd.getClassName(classes.get(i));
}
classChooserLabel = new JLabel("Class: ");
classChooser = new JComboBox(classNames);
classChooser.setToolTipText("Sets the class the inserted values will refer to");
classChooser.setSelectedItem(cd.getClassName(PMPA.getReferenceClass()));
edit.add(fromLabel);
edit.add(from);
edit.add(toLabel);
edit.add(to);
edit.add(stepsLabel);
edit.add(steps);
edit.add(classChooserLabel);
edit.add(classChooser);
edit.setPreferredSize(new Dimension(130, 88));
JPanel editLables = new JPanel(new GridLayout(4, 1, 0, 5));
editLables.add(fromLabel);
editLables.add(toLabel);
editLables.add(stepsLabel);
editLables.add(classChooserLabel);
editLables.setPreferredSize(new Dimension(100, 88));
JPanel editPanel = new JPanel();
editPanel.add(editLables);
editPanel.add(edit);
editPanel.setBorder(new EmptyBorder(15, 20, 0, 20));
JPanel cont = new JPanel(new BorderLayout());
cont.add(editPanel, BorderLayout.CENTER);
scroll = new JScrollPane(cont);
title = new TitledBorder("Type of population mix");
scroll.setBorder(title);
description = new JTextArea(DESCRIPTION);
description.setOpaque(false);
description.setEditable(false);
description.setLineWrap(true);
description.setWrapStyleWord(true);
descrPane = new JScrollPane(description);
descriptionTitle = new TitledBorder(new EtchedBorder(), "Description");
descrPane.setBorder(descriptionTitle);
descrPane.setMinimumSize(new Dimension(80, 0));
scroll.setMinimumSize(new Dimension(360, 0));
setLeftComponent(scroll);
setRightComponent(descrPane);
setListeners();
this.setBorder(new EmptyBorder(5, 0, 5, 0));
}
示例4: initialize
import javax.swing.JSpinner; //导入方法依赖的package包/类
public void initialize() {
JPanel edit = new JPanel(new GridLayout(4, 1, 0, 5));
fromLabel = new JLabel("Initial �: ");
from = new JSpinner(new SpinnerNumberModel(PMPA.getInitialValue(), 0.000, 1.000, 0.001));
from.setToolTipText("Sets the initial proportion of jobs");
toLabel = new JLabel("Final �: ");
to = new JSpinner(new SpinnerNumberModel(PMPA.getFinalValue(), 0.000, 1.000, 0.001));
to.setToolTipText("Sets the final proportion of jobs");
stepsLabel = new JLabel("Steps (n. of exec.): ");
int maxSteps = PMPA.searchForAvaibleSteps();
if (maxSteps > ParametricAnalysis.MAX_STEP_NUMBER) {
maxSteps = ParametricAnalysis.MAX_STEP_NUMBER;
}
steps = new JSpinner(new SpinnerNumberModel(PMPA.getNumberOfSteps(), 2, maxSteps, 1));
steps.setToolTipText("Sets the number of steps to be performed");
Vector classes = cd.getClosedClassKeys();
String[] classNames = new String[classes.size()];
for (int i = 0; i < classes.size(); i++) {
classNames[i] = cd.getClassName(classes.get(i));
}
classChooserLabel = new JLabel("Class: ");
classChooser = new JComboBox(classNames);
classChooser.setToolTipText("Sets the class the inserted values will refer to");
classChooser.setSelectedItem(cd.getClassName(PMPA.getReferenceClass()));
edit.add(fromLabel);
edit.add(from);
edit.add(toLabel);
edit.add(to);
edit.add(stepsLabel);
edit.add(steps);
edit.add(classChooserLabel);
edit.add(classChooser);
edit.setPreferredSize(new Dimension(130, 88));
JPanel editLables = new JPanel(new GridLayout(4, 1, 0, 5));
editLables.add(fromLabel);
editLables.add(toLabel);
editLables.add(stepsLabel);
editLables.add(classChooserLabel);
editLables.setPreferredSize(new Dimension(100, 88));
JPanel editPanel = new JPanel();
editPanel.add(editLables);
editPanel.add(edit);
editPanel.setBorder(new EmptyBorder(15, 20, 0, 20));
JPanel cont = new JPanel(new BorderLayout());
cont.add(editPanel, BorderLayout.CENTER);
scroll = new JScrollPane(cont);
title = new TitledBorder("Type of population mix");
scroll.setBorder(title);
description = new JTextArea(DESCRIPTION);
description.setOpaque(false);
description.setEditable(false);
description.setLineWrap(true);
description.setWrapStyleWord(true);
descrPane = new JScrollPane(description);
descriptionTitle = new TitledBorder(new EtchedBorder(), "Description");
descrPane.setBorder(descriptionTitle);
descrPane.setMinimumSize(new Dimension(80, 0));
scroll.setMinimumSize(new Dimension(360, 0));
setLeftComponent(scroll);
setRightComponent(descrPane);
setListeners();
this.setBorder(new EmptyBorder(5, 0, 5, 0));
}