本文整理汇总了Java中java.awt.GridBagConstraints.VERTICAL属性的典型用法代码示例。如果您正苦于以下问题:Java GridBagConstraints.VERTICAL属性的具体用法?Java GridBagConstraints.VERTICAL怎么用?Java GridBagConstraints.VERTICAL使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类java.awt.GridBagConstraints
的用法示例。
在下文中一共展示了GridBagConstraints.VERTICAL属性的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initialize
/**
* This method initializes this
*/
private void initialize() {
GridBagConstraints gridBagConstraints1 = new GridBagConstraints();
gridBagConstraints1.fill = GridBagConstraints.VERTICAL;
gridBagConstraints1.gridy = 1;
gridBagConstraints1.weightx = 1.0;
gridBagConstraints1.insets = new Insets(2, 2, 2, 2);
gridBagConstraints1.gridx = 0;
GridBagConstraints gridBagConstraints2 = new GridBagConstraints();
gridBagConstraints2.gridx = 0;
gridBagConstraints2.insets = new Insets(2, 2, 2, 2);
gridBagConstraints2.fill = GridBagConstraints.VERTICAL;
gridBagConstraints2.gridy = 2;
this.setLayout(new GridBagLayout());
this.add(getExecuteButton(), gridBagConstraints1);
this.add(getQueryField(), gridBagConstraints2);
}
示例2: initialize
/**
* This method initializes this
*
* @return void
*/
private void initialize() {
GridBagConstraints gridBagConstraints1 = new GridBagConstraints();
gridBagConstraints1.fill = GridBagConstraints.VERTICAL;
gridBagConstraints1.gridy = 1;
gridBagConstraints1.weightx = 1.0;
gridBagConstraints1.insets = new Insets(2, 2, 2, 2);
gridBagConstraints1.gridx = 0;
GridBagConstraints gridBagConstraints = new GridBagConstraints();
gridBagConstraints.gridx = 0;
gridBagConstraints.insets = new Insets(2, 2, 2, 2);
gridBagConstraints.fill = GridBagConstraints.HORIZONTAL;
gridBagConstraints.gridy = 2;
this.setSize(300, 200);
this.setLayout(new GridBagLayout());
// The Go button is redundant since the action is perform immediately
// after selecting an Input from the Input drop-down menu.
//this.add(getJButton(), gridBagConstraints);
this.add(getJComboBox(), gridBagConstraints1);
}
示例3: ProcessLocationValueCellEditor
public ProcessLocationValueCellEditor(final ParameterTypeProcessLocation type) {
super(type);
openProcessButton.setEnabled(false);
GridBagConstraints gbc = new GridBagConstraints();
gbc.gridx = 0;
gbc.weightx = 1.0;
gbc.weighty = 1.0;
gbc.fill = GridBagConstraints.BOTH;
surroundingPanel.add(getPanel(), gbc);
gbc.gridx += 1;
gbc.weightx = 0.0;
gbc.fill = GridBagConstraints.VERTICAL;
gbc.insets = new Insets(0, 2, 0, 0);
surroundingPanel.add(openProcessButton, gbc);
addCellEditorListener(listener);
}
示例4: initializeLabels
private void initializeLabels() {
this.lblTrechos = new JLabel("Trechos");
GridBagConstraints gbc_lblTrechos = new GridBagConstraints();
gbc_lblTrechos.fill = GridBagConstraints.VERTICAL;
gbc_lblTrechos.gridx = 0;
gbc_lblTrechos.gridy = 0;
this.panelFirst.add(this.lblTrechos, gbc_lblTrechos);
this.lblBuscarTrecho = new JLabel(
"<html><p align=\"right\" style=\"word-wrap: break-word;\">Buscar trecho por nome:</p></html>");
GridBagConstraints gbc_lblBuscarTrecho = new GridBagConstraints();
gbc_lblBuscarTrecho.insets = new Insets(0, 0, 5, 5);
gbc_lblBuscarTrecho.gridx = 1;
gbc_lblBuscarTrecho.gridy = 0;
this.panelSecond.add(this.lblBuscarTrecho, gbc_lblBuscarTrecho);
}
示例5: initializeButtons
private void initializeButtons() {
this.btnVoltar = new JButton("< Voltar");
this.btnVoltar.addActionListener(this);
GridBagConstraints gbc_button = new GridBagConstraints();
gbc_button.insets = new Insets(0, 0, 0, 5);
gbc_button.gridx = 1;
gbc_button.gridy = 1;
this.panelFirst.add(this.btnVoltar, gbc_button);
this.btnBuscar = new JButton("Buscar");
this.btnBuscar.addActionListener(this);
GridBagConstraints gbc_btnBuscar = new GridBagConstraints();
gbc_btnBuscar.insets = new Insets(0, 0, 5, 0);
gbc_btnBuscar.fill = GridBagConstraints.VERTICAL;
gbc_btnBuscar.gridwidth = 16;
gbc_btnBuscar.gridx = 0;
gbc_btnBuscar.gridy = 12;
panelSecond.add(this.btnBuscar, gbc_btnBuscar);
}
示例6: setFillingMode
final public ExtendedGridBagConstraints setFillingMode(int intPfillingMode) {
switch (intPfillingMode) {
case GridBagConstraints.NONE:
this.weightx = this.weighty = 0.0F;
//$FALL-THROUGH$
case GridBagConstraints.HORIZONTAL:
case GridBagConstraints.VERTICAL:
case GridBagConstraints.BOTH:
this.fill = intPfillingMode;
break;
default:
Tools.err("bad grid filling value : ", intPfillingMode);
break;
}
return this;
}
示例7: initialize
/**
* This method initializes this
*/
private void initialize() {
GridBagConstraints gridBagConstraints1 = new GridBagConstraints();
gridBagConstraints1.fill = GridBagConstraints.VERTICAL;
gridBagConstraints1.gridy = 1;
gridBagConstraints1.weightx = 1.0;
gridBagConstraints1.insets = new Insets(2, 2, 2, 2);
gridBagConstraints1.gridx = 0;
GridBagConstraints gridBagConstraints = new GridBagConstraints();
gridBagConstraints.gridx = 0;
gridBagConstraints.insets = new Insets(2, 2, 2, 2);
gridBagConstraints.fill = GridBagConstraints.HORIZONTAL;
gridBagConstraints.gridy = 2;
GridBagConstraints gridBagConstraints2 = new GridBagConstraints();
gridBagConstraints2.gridx = 0;
gridBagConstraints2.insets = new Insets(2, 2, 2, 2);
gridBagConstraints2.fill = GridBagConstraints.VERTICAL;
gridBagConstraints2.gridy = 3;
this.setLayout(new GridBagLayout());
this.add(getExecuteButton(), gridBagConstraints1);
this.add(new JLabel("Node query:"), gridBagConstraints);
this.add(getQueryField(), gridBagConstraints2);
}
示例8: setHorizontalFill
public void setHorizontalFill(Component component, boolean fill) {
int oldFill = info.getFill(component);
if(fill) switch(oldFill) {
case GridBagConstraints.NONE: oldFill = GridBagConstraints.HORIZONTAL; break;
case GridBagConstraints.VERTICAL: oldFill = GridBagConstraints.BOTH; break;
} else switch(oldFill) {
case GridBagConstraints.HORIZONTAL: oldFill = GridBagConstraints.NONE; break;
case GridBagConstraints.BOTH: oldFill = GridBagConstraints.VERTICAL; break;
}
setProperty(component, "fill", oldFill); // NOI18N
}
示例9: initialize
/**
* This method initializes this
*/
private void initialize() {
GridBagConstraints gridBagConstraints1 = new GridBagConstraints();
gridBagConstraints1.fill = GridBagConstraints.VERTICAL;
gridBagConstraints1.gridy = 1;
gridBagConstraints1.weightx = 1.0;
gridBagConstraints1.insets = new Insets(2, 2, 2, 2);
gridBagConstraints1.gridx = 0;
GridBagConstraints gridBagConstraints = new GridBagConstraints();
gridBagConstraints.gridx = 0;
gridBagConstraints.insets = new Insets(2, 2, 2, 2);
gridBagConstraints.fill = GridBagConstraints.HORIZONTAL;
gridBagConstraints.gridy = 2;
GridBagConstraints gridBagConstraints2 = new GridBagConstraints();
gridBagConstraints2.gridx = 0;
gridBagConstraints2.insets = new Insets(2, 2, 2, 2);
gridBagConstraints2.fill = GridBagConstraints.HORIZONTAL;
gridBagConstraints2.gridy = 3;
GridBagConstraints gridBagConstraints3 = new GridBagConstraints();
gridBagConstraints3.gridx = 0;
gridBagConstraints3.insets = new Insets(2, 2, 2, 2);
gridBagConstraints3.fill = GridBagConstraints.HORIZONTAL;
gridBagConstraints3.gridy = 4;
this.setLayout(new GridBagLayout());
this.add(getExploreButton(), gridBagConstraints1);
this.add(getIdField(), gridBagConstraints);
this.add(getDistanceField(), gridBagConstraints2);
this.add(getClearButton(), gridBagConstraints3);
}
示例10: ToggleButtonGroup
/**
* Creates a new button group from the given Actions (requires at least two actions).
*
* @param preferredSize
* the preferredSize of the nested {@link CompositeToggleButton}s or {@code null}
* @param actions
* the action
*/
public ToggleButtonGroup(Dimension preferredSize, Action... actions) {
if (actions.length < 2) {
throw new IllegalArgumentException("At least two primary actions must be specified.");
}
this.setOpaque(false);
this.preferredSize = preferredSize;
primaryButtons = new CompositeToggleButton[actions.length];
for (int i = 0; i < actions.length; i++) {
int position;
if (i == 0) {
position = SwingConstants.LEFT;
} else if (i < actions.length - 1) {
position = SwingConstants.CENTER;
} else {
position = SwingConstants.RIGHT;
}
primaryButtons[i] = new CompositeToggleButton(actions[i], position);
}
// align buttons left to right with no padding
GridBagLayout layout = new GridBagLayout();
setLayout(layout);
GridBagConstraints gbc = new GridBagConstraints();
gbc.insets = new Insets(0, 0, 0, 0);
gbc.fill = GridBagConstraints.VERTICAL;
gbc.weighty = 1;
for (JToggleButton button : primaryButtons) {
button.addActionListener(buttonChooser);
if (preferredSize != null) {
button.setMinimumSize(preferredSize);
button.setPreferredSize(preferredSize);
}
add(button, gbc);
}
}
示例11: initialize
/**
* This method initializes this
*
*/
private void initialize() {
GridBagConstraints gridBagConstraints1 = new GridBagConstraints();
gridBagConstraints1.anchor = GridBagConstraints.CENTER;
gridBagConstraints1.fill = GridBagConstraints.VERTICAL;
this.setLayout(new GridBagLayout());
this.add(getStopButton(), gridBagConstraints1);
}
示例12: init
@Override
public void init() {
GridBagConstraints gridBagConstraints2 = new GridBagConstraints();
gridBagConstraints2.gridx = 1;
gridBagConstraints2.gridy = 1;
gridBagConstraints2.anchor = GridBagConstraints.CENTER;
gridBagConstraints2.fill = GridBagConstraints.VERTICAL;
this.add( this.getJComboBox() , gridBagConstraints2 );
}
示例13: initialize
/**
* This method initializes this
*
*/
private void initialize() {
GridBagConstraints gridBagConstraints1 = new GridBagConstraints();
gridBagConstraints1.anchor = GridBagConstraints.CENTER;
gridBagConstraints1.fill = GridBagConstraints.VERTICAL;
this.setLayout(new GridBagLayout());
this.add(getLoadButton(), gridBagConstraints1);
}
示例14: showActionPane
/**
*
*/
public void showActionPane() {
setSimulation(true);
GridBagConstraints c = new GridBagConstraints();
c.gridwidth = 1;
c.gridx = 0;
c.gridy = 0;
c.weighty = 0;
c.weightx = 0;
c.fill = GridBagConstraints.VERTICAL;
c.anchor = GridBagConstraints.NORTH;
this.add(actPane, c);
this.revalidate();
this.repaint();
}
示例15: setWeightY
final public ExtendedGridBagConstraints setWeightY(double dblPweightY) {
if (dblPweightY >= 0) {
this.weighty = dblPweightY;
this.fill =
this.weightx > 0 ? dblPweightY > 0 ? GridBagConstraints.BOTH : GridBagConstraints.HORIZONTAL
: dblPweightY > 0 ? GridBagConstraints.VERTICAL : GridBagConstraints.NONE;
} else {
Tools.err("bad weight y value : ", dblPweightY);
}
return this;
}