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


Java GridBagConstraints.VERTICAL属性代码示例

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

示例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);
}
 
开发者ID:dev-cuttlefish,项目名称:cuttlefish,代码行数:24,代码来源:DataSourcePanel.java

示例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);

}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:20,代码来源:ProcessLocationValueCellEditor.java

示例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&nbsp;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);
}
 
开发者ID:cjlcarvalho,项目名称:LogisticApp,代码行数:16,代码来源:FracionalPanelBuilder.java

示例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);

	}
 
开发者ID:cjlcarvalho,项目名称:LogisticApp,代码行数:25,代码来源:MenuContratacaoTransporteFrame.java

示例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;
}
 
开发者ID:jugglemaster,项目名称:JuggleMasterPro,代码行数:16,代码来源:ExtendedGridBagConstraints.java

示例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);
	}
 
开发者ID:dev-cuttlefish,项目名称:cuttlefish,代码行数:28,代码来源:DBQueryPanel.java

示例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
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:11,代码来源:GridBagManager.java

示例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);
	}
 
开发者ID:dev-cuttlefish,项目名称:cuttlefish,代码行数:35,代码来源:DBBrowsePanel.java

示例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);
	}
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:47,代码来源:ToggleButtonGroup.java

示例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);
		
}
 
开发者ID:dev-cuttlefish,项目名称:cuttlefish,代码行数:13,代码来源:StopLayoutPanel.java

示例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 );
}
 
开发者ID:dev-cuttlefish,项目名称:cuttlefish,代码行数:9,代码来源:MousePanel.java

示例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);
		
}
 
开发者ID:dev-cuttlefish,项目名称:cuttlefish,代码行数:13,代码来源:InteractiveCxfNetworkPanel.java

示例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();
}
 
开发者ID:tslaats,项目名称:SE2017-Team2,代码行数:17,代码来源:GUIPane.java

示例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;
	}
 
开发者ID:jugglemaster,项目名称:JuggleMasterPro,代码行数:12,代码来源:ExtendedGridBagConstraints.java


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