本文整理了Java中javax.swing.JCheckBox.setMaximumSize()
方法的一些代码示例,展示了JCheckBox.setMaximumSize()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JCheckBox.setMaximumSize()
方法的具体详情如下:
包路径:javax.swing.JCheckBox
类名称:JCheckBox
方法名:setMaximumSize
暂无
代码示例来源:origin: magefree/mage
chkNames.setFocusable(false);
chkNames.setHorizontalTextPosition(javax.swing.SwingConstants.RIGHT);
chkNames.setMaximumSize(new java.awt.Dimension(67, 16));
chkNames.setMinimumSize(new java.awt.Dimension(67, 16));
chkNames.setPreferredSize(new java.awt.Dimension(67, 16));
chkTypes.setFocusable(false);
chkTypes.setHorizontalTextPosition(javax.swing.SwingConstants.RIGHT);
chkTypes.setMaximumSize(new java.awt.Dimension(63, 16));
chkTypes.setMinimumSize(new java.awt.Dimension(63, 16));
chkTypes.setPreferredSize(new java.awt.Dimension(63, 16));
chkRules.setFocusable(false);
chkRules.setHorizontalTextPosition(javax.swing.SwingConstants.RIGHT);
chkRules.setMaximumSize(new java.awt.Dimension(59, 16));
chkRules.setMinimumSize(new java.awt.Dimension(59, 16));
chkRules.setPreferredSize(new java.awt.Dimension(59, 16));
chkUnique.setFocusable(false);
chkUnique.setHorizontalTextPosition(javax.swing.SwingConstants.RIGHT);
chkUnique.setMaximumSize(new java.awt.Dimension(69, 16));
chkUnique.setMinimumSize(new java.awt.Dimension(69, 16));
chkUnique.setPreferredSize(new java.awt.Dimension(69, 16));
代码示例来源:origin: org.cytoscape/network-analyzer-impl
/**
* Creates a new checkbox with manageable width.
*
* @param aText
* Text of the checkbox.
* @param aToolTip
* Tooltip text for the checkbox. Set this to <code>null</code> if no tooltip is to be
* displayed.
* @param aListener
* Checkbox click's listener.
* @return Newly created instance of <code>JCheckBox</code>.
*/
public static JCheckBox createCheckBox(String aText, String aToolTip, ActionListener aListener) {
JCheckBox button = new JCheckBox(aText);
button.setToolTipText(aToolTip);
button.addActionListener(aListener);
button.setMaximumSize(new Dimension(Short.MAX_VALUE, button.getHeight()));
return button;
}
代码示例来源:origin: org.boofcv/demonstrations
public SubpixelCalibControlPanel( Listener listener ) {
this.listener = listener;
selectZoom = new JSpinner(new SpinnerNumberModel(zoom,1,100,1));
selectZoom.addChangeListener(this);
selectZoom.setMaximumSize(selectZoom.getPreferredSize());
showPixel = new JCheckBox("Show Crude");
showPixel.setSelected(doShowPixel);
showPixel.addItemListener(this);
showPixel.setMaximumSize(showPixel.getPreferredSize());
showSubpixel = new JCheckBox("Show Refined");
showSubpixel.setSelected(doShowSubpixel);
showSubpixel.addItemListener(this);
showSubpixel.setMaximumSize(showSubpixel.getPreferredSize());
addLabeled(selectZoom, "Zoom:",this);
addAlignLeft(showPixel, this);
addAlignLeft(showSubpixel,this);
}
代码示例来源:origin: org.boofcv/demonstrations
public DetectCalibrationCirclePanel(int gridRows, int gridColumns, double diameter , double spacing,
boolean showGraphs ) {
super(gridRows, gridColumns, false);
doShowNumbers = false;
this.showNumbers.setSelected(doShowNumbers);
this.showGraphs = showGraphs;
this.circleDiameter = diameter;
this.circleSpacing = spacing;
this.showClusters = new JCheckBox("Show Clusters");
this.showClusters.setSelected(doShowClusters);
this.showClusters.addItemListener(this);
this.showClusters.setMaximumSize(this.showClusters.getPreferredSize());
selectDiameter = spinner(diameter,0.0,1000.0,1.0);
selectSpacing = spinner(spacing,0.0,1000.0,1.0);
addComponents();
}
代码示例来源:origin: org.boofcv/demonstrations
showInput.setSelected(false);
showInput.addItemListener(this);
showInput.setMaximumSize(showInput.getPreferredSize());
showGrid.setMaximumSize(showGrid.getPreferredSize());
showLog.setMaximumSize(showLog.getPreferredSize());
showLocal.setMaximumSize(showLocal.getPreferredSize());
代码示例来源:origin: edu.toronto.cs.medsavant/medsavant-client
checkBox.setMaximumSize(new Dimension(1000, 20));
checkBox.setBackground(getBackground());
checkBox.addItemListener(new ItemListener() {
b1.setMaximumSize(new Dimension(1000, 20));
b1.setBackground(Color.white);
b1.addItemListener(new ItemListener() {
代码示例来源:origin: igvteam/igv
downloadSequenceCB.setAlignmentX(1.0F);
downloadSequenceCB.setToolTipText("Download the full sequence for this organism. Note that these files can be very large (human is about 3 gigabytes)");
downloadSequenceCB.setMaximumSize(new Dimension(1000, 23));
downloadSequenceCB.setPreferredSize(new Dimension(300, 23));
downloadSequenceCB.setMinimumSize(new Dimension(300, 23));
代码示例来源:origin: org.gephi/visualization
selectionColorCheckbox.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
selectionColorCheckbox.setHorizontalTextPosition(javax.swing.SwingConstants.LEFT);
selectionColorCheckbox.setMaximumSize(new java.awt.Dimension(160, 18));
selectionColorCheckbox.setMinimumSize(new java.awt.Dimension(160, 18));
selectionColorCheckbox.setPreferredSize(new java.awt.Dimension(160, 18));
代码示例来源:origin: ontop/ontop
chkShowShortURI.setMaximumSize(new java.awt.Dimension(75, 23));
chkShowShortURI.setMinimumSize(new java.awt.Dimension(75, 23));
pnlExecutionInfo.add(chkShowShortURI, new java.awt.GridBagConstraints());
代码示例来源:origin: hyperion-project/hypercon
mSwitchOffOnBlackBox.setMaximumSize(maxDim);
mSwitchOffOnBlackBox.addChangeListener(mChangeListener);
add(mSwitchOffOnBlackBox);
代码示例来源:origin: org.boofcv/demonstrations
showGrid.setSelected(doShowGrid);
showGrid.addItemListener(this);
showGrid.setMaximumSize(showGrid.getPreferredSize());
useFast.setMaximumSize(useFast.getPreferredSize());
代码示例来源:origin: hyperion-project/hypercon
museOrbSmoothingBox.setMaximumSize(maxDim);
museOrbSmoothingBox.addChangeListener(mChangeListener);
add(museOrbSmoothingBox);
代码示例来源:origin: igvteam/igv
jCheckBox1.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
jCheckBox1.setMargin(new java.awt.Insets(0, 0, 0, 0));
jCheckBox1.setMaximumSize(new java.awt.Dimension(32767, 22));
jCheckBox1.setVerticalAlignment(javax.swing.SwingConstants.TOP);
jCheckBox1.setVerticalTextPosition(javax.swing.SwingConstants.TOP);
代码示例来源:origin: MegaMek/mekhq
allowPrisoners.setMaximumSize(new Dimension(Short.MAX_VALUE, (int) allowPrisoners.getPreferredSize().getHeight()));
allowPrisoners.addChangeListener(e ->
代码示例来源:origin: org.boofcv/demonstrations
public PanelConfigMeanShift() {
selectConnect = new JComboBox(new String[]{"4-Connect","8-Connect"});
selectConnect.addActionListener(this);
selectConnect.setMaximumSize(selectConnect.getPreferredSize());
spinnerSize = new JSpinner(new SpinnerNumberModel(10,5,200,5));
spinnerSize.addChangeListener(this);
spinnerSize.setMaximumSize(spinnerSize.getPreferredSize());
spinnerSpacial = new JSpinner(new SpinnerNumberModel(10,1,50,1));
spinnerSpacial.addChangeListener(this);
spinnerSpacial.setMaximumSize(spinnerSpacial.getPreferredSize());
spinnerColor = new JSpinner(new SpinnerNumberModel(10,5,255,5));
spinnerColor.addChangeListener(this);
spinnerColor.setMaximumSize(spinnerColor.getPreferredSize());
toggleFast = new JCheckBox("Fast");
toggleFast.addChangeListener(this);
toggleFast.setMaximumSize(toggleFast.getPreferredSize());
configure();
addAlignCenter(selectConnect,this);
addLabeled(spinnerSize, "Min Size", this);
addLabeled(spinnerSpacial, "Spacial Rad", this);
addLabeled(spinnerColor, "Color Rad", this);
addAlignCenter(toggleFast, this);
}
代码示例来源:origin: org.boofcv/boofcv-swing
public JConfigLength( Listener listener, boolean integerMode ) {
setLayout(new BoxLayout(this,BoxLayout.X_AXIS));
this.listener = listener;
this.integerMode = integerMode;
if( integerMode ) {
textLength = new JFormattedTextField(NumberFormat.getIntegerInstance());
} else {
textLength = new JFormattedTextField(NumberFormat.getNumberInstance());
}
toggleFixed.setSelected(modeRelative);
toggleFixed.addActionListener(this);
toggleFixed.setMaximumSize(toggleFixed.getPreferredSize());
spinnerFraction.setValue(valueFraction.fraction);
JFormattedTextField jftf = ((JSpinner.DefaultEditor)spinnerFraction.getEditor()).getTextField();
jftf.setColumns(3);
spinnerFraction.addChangeListener(this);
textLength.setValue(valueFraction.length);
textLength.setColumns(4);
textLength.addPropertyChangeListener("value",this);
add(toggleFixed);
add(spinnerFraction);
add(textLength);
}
代码示例来源:origin: org.boofcv/demonstrations
invalidToggle.setSelected(colorInvalid);
invalidToggle.addItemListener(this);
invalidToggle.setMaximumSize(invalidToggle.getPreferredSize());
subpixelToggle.setSelected(useSubpixel);
subpixelToggle.addItemListener(this);
subpixelToggle.setMaximumSize(invalidToggle.getPreferredSize());
代码示例来源:origin: sc.fiji/TrakEM2_
Dimension maxdim = new Dimension(26, 14);
this.c.setPreferredSize(maxdim);
this.c.setMaximumSize(maxdim);
Dimension maxdim10 = new Dimension(26, 10);
this.c_locked.setPreferredSize(maxdim10);
this.c_locked.setMaximumSize(maxdim10);
this.c_linked.setBackground(Color.white);
this.c_linked.setPreferredSize(maxdim10);
this.c_linked.setMaximumSize(maxdim10);
内容来源于网络,如有侵权,请联系作者删除!