本文整理汇总了Java中java.awt.GridBagConstraints.LINE_END属性的典型用法代码示例。如果您正苦于以下问题:Java GridBagConstraints.LINE_END属性的具体用法?Java GridBagConstraints.LINE_END怎么用?Java GridBagConstraints.LINE_END使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类java.awt.GridBagConstraints
的用法示例。
在下文中一共展示了GridBagConstraints.LINE_END属性的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setInsideLocation
final public ExtendedGridBagConstraints setInsideLocation(int intPinsideLocation) {
switch (intPinsideLocation) {
case GridBagConstraints.PAGE_START:
case GridBagConstraints.PAGE_END:
case GridBagConstraints.LINE_START:
case GridBagConstraints.LINE_END:
case GridBagConstraints.FIRST_LINE_START:
case GridBagConstraints.FIRST_LINE_END:
case GridBagConstraints.LAST_LINE_START:
case GridBagConstraints.LAST_LINE_END:
case GridBagConstraints.BASELINE:
case GridBagConstraints.BASELINE_LEADING:
case GridBagConstraints.BASELINE_TRAILING:
case GridBagConstraints.ABOVE_BASELINE:
case GridBagConstraints.ABOVE_BASELINE_LEADING:
case GridBagConstraints.ABOVE_BASELINE_TRAILING:
case GridBagConstraints.BELOW_BASELINE:
case GridBagConstraints.BELOW_BASELINE_LEADING:
case GridBagConstraints.BELOW_BASELINE_TRAILING:
Tools.err("strange grid anchor value : ", intPinsideLocation);
//$FALL-THROUGH$
case GridBagConstraints.CENTER:
case GridBagConstraints.NORTH:
case GridBagConstraints.NORTHWEST:
case GridBagConstraints.NORTHEAST:
case GridBagConstraints.SOUTH:
case GridBagConstraints.SOUTHWEST:
case GridBagConstraints.SOUTHEAST:
case GridBagConstraints.WEST:
case GridBagConstraints.EAST:
this.anchor = intPinsideLocation;
break;
default:
Tools.err("bad grid anchor value : ", intPinsideLocation);
}
return this;
}
示例2: SettingsPanel
public SettingsPanel() {
setLayout(new GridBagLayout());
GridBagConstraints c = new GridBagConstraints();
setPreferredSize(new Dimension(250,120));
setBackground(Color.WHITE);
this.settingsLabel = new JLabel("USTAWIENIA PARAMETRÓW ANIMACJI");
c.gridx = 0;
c.gridy = 0;
c.gridwidth = 3;
c.insets = new Insets(0,0,2,0);
this.settingsLabel.setFont(this.header);
this.add(this.settingsLabel,c);
this.teethLabel = new JLabel("Liczba ząbków: ");
c.gridy = 1;
c.anchor=GridBagConstraints.LINE_START;
this.teethLabel.setFont(this.mainFont);
this.add(this.teethLabel,c);
Integer[] teeth = {500, 600, 700, 720, 800, 1000};
this.nTeeth = new JComboBox<Integer>(teeth);
c.gridx = 2;
c.gridy = 1;
c.anchor=GridBagConstraints.LINE_END;
this.nTeeth.setFont(this.mainFont);
this.add(this.nTeeth,c);
this.distanceLabel = new JLabel("Odległość od lustra [m] : ");
c.gridx = 0;
c.gridy = 2;
c.insets = new Insets(2,0,0,0);
c.anchor=GridBagConstraints.LINE_START;
this.distanceLabel.setFont(this.mainFont);
this.add(this.distanceLabel,c);
Integer[] dist = {5000, 6000, 7000, 8000, 8633 , 9000, 10000};
this.distance = new JComboBox<Integer>(dist);
c.gridx = 2;
c.anchor=GridBagConstraints.LINE_END;
this.distance.setFont(this.mainFont);
this.add(this.distance,c);
this.velSliderLabel = new JLabel("Prędkośc obrotu koła [rad/s] : ");
c.gridx = 0;
c.gridy = 3;
c.anchor=GridBagConstraints.LINE_START;
this.velSliderLabel.setFont(this.mainFont);
this.add(this.velSliderLabel,c);
this.velLabel = new JLabel("200");
this.velLabel.setFont(this.mainFont);
c.gridx = 1;
c.anchor=GridBagConstraints.LINE_END;
this.add(this.velLabel,c);
this.velSlider = new JSlider(0,2000,200);
c.gridx = 0;
c.gridy = 4;
c.gridwidth = 3;
c.insets = new Insets(0,0,7,0);
c.fill= GridBagConstraints.HORIZONTAL;
c.anchor=GridBagConstraints.LINE_END;
this.velSlider.setBackground(Color.WHITE);
this.velSlider.setMajorTickSpacing(5);
this.velSlider.setSnapToTicks(true);
this.add(this.velSlider,c);
}
示例3: JobAttributesPanel
public JobAttributesPanel() {
super();
GridBagLayout gridbag = new GridBagLayout();
GridBagConstraints c = new GridBagConstraints();
setLayout(gridbag);
setBorder(BorderFactory.createTitledBorder(strTitle));
c.fill = GridBagConstraints.NONE;
c.insets = compInsets;
c.weighty = 1.0;
cbJobSheets = createCheckBox("checkbox.jobsheets", this);
c.anchor = GridBagConstraints.LINE_START;
addToGB(cbJobSheets, this, gridbag, c);
JPanel pnlTop = new JPanel();
lblPriority = new JLabel(getMsg("label.priority"), JLabel.TRAILING);
lblPriority.setDisplayedMnemonic(getMnemonic("label.priority"));
pnlTop.add(lblPriority);
snModel = new SpinnerNumberModel(1, 1, 100, 1);
spinPriority = new JSpinner(snModel);
lblPriority.setLabelFor(spinPriority);
// REMIND
((JSpinner.NumberEditor)spinPriority.getEditor()).getTextField().setColumns(3);
spinPriority.addChangeListener(this);
pnlTop.add(spinPriority);
c.anchor = GridBagConstraints.LINE_END;
c.gridwidth = GridBagConstraints.REMAINDER;
pnlTop.getAccessibleContext().setAccessibleName(
getMsg("label.priority"));
addToGB(pnlTop, this, gridbag, c);
c.fill = GridBagConstraints.HORIZONTAL;
c.anchor = GridBagConstraints.CENTER;
c.weightx = 0.0;
c.gridwidth = 1;
char jmnemonic = getMnemonic("label.jobname");
lblJobName = new JLabel(getMsg("label.jobname"), JLabel.TRAILING);
lblJobName.setDisplayedMnemonic(jmnemonic);
addToGB(lblJobName, this, gridbag, c);
c.weightx = 1.0;
c.gridwidth = GridBagConstraints.REMAINDER;
tfJobName = new JTextField();
lblJobName.setLabelFor(tfJobName);
tfJobName.addFocusListener(this);
tfJobName.setFocusAccelerator(jmnemonic);
tfJobName.getAccessibleContext().setAccessibleName(
getMsg("label.jobname"));
addToGB(tfJobName, this, gridbag, c);
c.weightx = 0.0;
c.gridwidth = 1;
char umnemonic = getMnemonic("label.username");
lblUserName = new JLabel(getMsg("label.username"), JLabel.TRAILING);
lblUserName.setDisplayedMnemonic(umnemonic);
addToGB(lblUserName, this, gridbag, c);
c.gridwidth = GridBagConstraints.REMAINDER;
tfUserName = new JTextField();
lblUserName.setLabelFor(tfUserName);
tfUserName.addFocusListener(this);
tfUserName.setFocusAccelerator(umnemonic);
tfUserName.getAccessibleContext().setAccessibleName(
getMsg("label.username"));
addToGB(tfUserName, this, gridbag, c);
}