本文整理匯總了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);
}