当前位置: 首页>>代码示例>>Java>>正文


Java JSpinner.setToolTipText方法代码示例

本文整理汇总了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));
}
 
开发者ID:max6cn,项目名称:jmt,代码行数:36,代码来源:SeedPanel.java

示例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));
}
 
开发者ID:HOMlab,项目名称:QN-ACTR-Release,代码行数:36,代码来源:SeedPanel.java

示例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));
}
 
开发者ID:max6cn,项目名称:jmt,代码行数:64,代码来源:PopulationMixPanel.java

示例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));
}
 
开发者ID:HOMlab,项目名称:QN-ACTR-Release,代码行数:64,代码来源:PopulationMixPanel.java


注:本文中的javax.swing.JSpinner.setToolTipText方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。