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


Java GridBagConstraints.SOUTHWEST属性代码示例

本文整理汇总了Java中java.awt.GridBagConstraints.SOUTHWEST属性的典型用法代码示例。如果您正苦于以下问题:Java GridBagConstraints.SOUTHWEST属性的具体用法?Java GridBagConstraints.SOUTHWEST怎么用?Java GridBagConstraints.SOUTHWEST使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在java.awt.GridBagConstraints的用法示例。


在下文中一共展示了GridBagConstraints.SOUTHWEST属性的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: addSlidingView

public void addSlidingView (SlidingView view) {
    Set<SlidingView> slidingViews = getSlidingViews();
    if (slidingViews.contains(view)) {
        return;
    }
    slidingViews.add(view);
    GridBagConstraints constraint = new GridBagConstraints();
    constraint.fill = GridBagConstraints.BOTH;
    if (Constants.BOTTOM.equals(view.getSide())) {
        constraint.gridx = 0;
        constraint.gridy = 2;
        constraint.gridwidth = 3;
        constraint.anchor = GridBagConstraints.SOUTHWEST;
        
    } else if (Constants.LEFT.equals(view.getSide())) {
        constraint.gridx = 0;
        constraint.gridy = 1;
        constraint.gridheight = 1;
        constraint.anchor = GridBagConstraints.NORTHWEST;
    } else if (Constants.RIGHT.equals(view.getSide())) {
        constraint.gridx = 2;
        constraint.gridy = 1;
        constraint.gridheight = 1;
        constraint.anchor = GridBagConstraints.NORTHEAST;
    } else if (Constants.TOP.equals(view.getSide())) {
        constraint.gridx = 1;
        constraint.gridy = 0;
        constraint.gridheight = 1;
        constraint.gridwidth = 2;
        constraint.anchor = GridBagConstraints.NORTHWEST;
    }
    desktop.add(view.getComponent(), constraint);
    if( Constants.BOTTOM.equals( view.getSide()) && view.getComponent() instanceof JPanel ) {
        JPanel panel = ( JPanel ) view.getComponent();
        MainWindow.getInstance().setStatusBarContainer( panel );
    }
    // #45033 fix - invalidate isn't enough, revalidate is correct
    layeredPane.revalidate();
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:39,代码来源:DesktopImpl.java

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

示例3: initialize

private void initialize() {
	GridBagLayout gridBagLayout = new GridBagLayout();
	gridBagLayout.columnWidths = new int[]{0, 0, 0, 0};
	gridBagLayout.rowHeights = new int[]{0, 0, 0, 0, 0};
	gridBagLayout.columnWeights = new double[]{0.0, 1.0, 0.0, Double.MIN_VALUE};
	gridBagLayout.rowWeights = new double[]{0.0, 0.0, 0.0, 1.0, Double.MIN_VALUE};
	setLayout(gridBagLayout);
	GridBagConstraints gbc_jLabelVersion = new GridBagConstraints();
	gbc_jLabelVersion.anchor = GridBagConstraints.WEST;
	gbc_jLabelVersion.gridwidth = 2;
	gbc_jLabelVersion.insets = new Insets(0, 0, 5, 5);
	gbc_jLabelVersion.gridx = 0;
	gbc_jLabelVersion.gridy = 0;
	add(getJLabelVersion(), gbc_jLabelVersion);
	GridBagConstraints gbc_jButtonEditVersion = new GridBagConstraints();
	gbc_jButtonEditVersion.anchor = GridBagConstraints.EAST;
	gbc_jButtonEditVersion.insets = new Insets(0, 0, 5, 0);
	gbc_jButtonEditVersion.gridx = 2;
	gbc_jButtonEditVersion.gridy = 0;
	add(getJButtonEditVersion(), gbc_jButtonEditVersion);
	GridBagConstraints gbc_jLabelMajorVersion = new GridBagConstraints();
	gbc_jLabelMajorVersion.insets = new Insets(0, 0, 0, 5);
	gbc_jLabelMajorVersion.anchor = GridBagConstraints.WEST;
	gbc_jLabelMajorVersion.gridx = 0;
	gbc_jLabelMajorVersion.gridy = 1;
	add(getJLabelMajorVersion(), gbc_jLabelMajorVersion);
	GridBagConstraints gbc_jTextFieldMajorVersion = new GridBagConstraints();
	gbc_jTextFieldMajorVersion.gridwidth = 2;
	gbc_jTextFieldMajorVersion.fill = GridBagConstraints.HORIZONTAL;
	gbc_jTextFieldMajorVersion.gridx = 1;
	gbc_jTextFieldMajorVersion.gridy = 1;
	add(getJTextFieldMajorVersion(), gbc_jTextFieldMajorVersion);
	GridBagConstraints gbc_jLableMinorVersion = new GridBagConstraints();
	gbc_jLableMinorVersion.anchor = GridBagConstraints.WEST;
	gbc_jLableMinorVersion.insets = new Insets(0, 0, 5, 5);
	gbc_jLableMinorVersion.gridx = 0;
	gbc_jLableMinorVersion.gridy = 2;
	add(getJLableMinorVersion(), gbc_jLableMinorVersion);
	GridBagConstraints gbc_jTextFieldMinorVersion = new GridBagConstraints();
	gbc_jTextFieldMinorVersion.gridwidth = 2;
	gbc_jTextFieldMinorVersion.insets = new Insets(0, 0, 5, 0);
	gbc_jTextFieldMinorVersion.fill = GridBagConstraints.HORIZONTAL;
	gbc_jTextFieldMinorVersion.gridx = 1;
	gbc_jTextFieldMinorVersion.gridy = 2;
	add(getJTextFieldMinorVersion(), gbc_jTextFieldMinorVersion);
	GridBagConstraints gbc_jLabelBuildNo = new GridBagConstraints();
	gbc_jLabelBuildNo.anchor = GridBagConstraints.SOUTHWEST;
	gbc_jLabelBuildNo.insets = new Insets(0, 0, 5, 5);
	gbc_jLabelBuildNo.gridx = 0;
	gbc_jLabelBuildNo.gridy = 3;
	add(getJLabelBuildNo(), gbc_jLabelBuildNo);
	GridBagConstraints gbc_jTextFieldBuildNo = new GridBagConstraints();
	gbc_jTextFieldBuildNo.anchor = GridBagConstraints.SOUTH;
	gbc_jTextFieldBuildNo.gridwidth = 2;
	gbc_jTextFieldBuildNo.fill = GridBagConstraints.HORIZONTAL;
	gbc_jTextFieldBuildNo.gridx = 1;
	gbc_jTextFieldBuildNo.gridy = 3;
	add(getJTextFieldBuildNo(), gbc_jTextFieldBuildNo);
}
 
开发者ID:EnFlexIT,项目名称:AgentWorkbench,代码行数:59,代码来源:ProjectInfoVersionPanel.java

示例4: initialize

/**
 * This method initializes this
 * @return void
 */
private void initialize() {

	GridBagLayout gridBagLayout = new GridBagLayout();
	gridBagLayout.columnWidths = new int[] { 0, 0, 0, 0 };
	gridBagLayout.rowHeights = new int[] { 0, 0, 0, 0 };
	gridBagLayout.columnWeights = new double[] { 0.0, 1.0, 0.0, Double.MIN_VALUE };
	gridBagLayout.rowWeights = new double[] { 0.0, 0.0, 0.0, Double.MIN_VALUE };
	this.setLayout(gridBagLayout);
	this.setSize(429, 102);
	GridBagConstraints gbc_jLabelMTPProtocol = new GridBagConstraints();
	gbc_jLabelMTPProtocol.anchor = GridBagConstraints.WEST;
	gbc_jLabelMTPProtocol.insets = new Insets(0, 0, 3, 5);
	gbc_jLabelMTPProtocol.gridx = 0;
	gbc_jLabelMTPProtocol.gridy = 0;
	add(getJLabelMTPProtocol(), gbc_jLabelMTPProtocol);
	GridBagConstraints gbc_comboBox = new GridBagConstraints();
	gbc_comboBox.anchor = GridBagConstraints.SOUTHWEST;
	gbc_comboBox.insets = new Insets(0, 0, 5, 5);
	gbc_comboBox.gridx = 1;
	gbc_comboBox.gridy = 0;
	add(getJComboBoxMtpProtocol(), gbc_comboBox);
	GridBagConstraints gbc_jButtonEditMTP = new GridBagConstraints();
	gbc_jButtonEditMTP.anchor = GridBagConstraints.SOUTH;
	gbc_jButtonEditMTP.insets = new Insets(0, 0, 5, 5);
	gbc_jButtonEditMTP.gridx = 2;
	gbc_jButtonEditMTP.gridy = 0;
	add(getJButtonEditMTP(), gbc_jButtonEditMTP);
	GridBagConstraints gbc_jLabelKeystorePath = new GridBagConstraints();
	gbc_jLabelKeystorePath.anchor = GridBagConstraints.WEST;
	gbc_jLabelKeystorePath.insets = new Insets(0, 0, 5, 5);
	gbc_jLabelKeystorePath.gridx = 0;
	gbc_jLabelKeystorePath.gridy = 1;
	add(getJLabelKeystorePath(), gbc_jLabelKeystorePath);
	GridBagConstraints gbc_jTextFieldKeyStorePath = new GridBagConstraints();
	gbc_jTextFieldKeyStorePath.gridwidth = 2;
	gbc_jTextFieldKeyStorePath.insets = new Insets(0, 0, 5, 5);
	gbc_jTextFieldKeyStorePath.fill = GridBagConstraints.HORIZONTAL;
	gbc_jTextFieldKeyStorePath.gridx = 1;
	gbc_jTextFieldKeyStorePath.gridy = 1;
	add(getJTextFieldKeyStorePath(), gbc_jTextFieldKeyStorePath);
	GridBagConstraints gbc_jLabelTruststorePath = new GridBagConstraints();
	gbc_jLabelTruststorePath.anchor = GridBagConstraints.WEST;
	gbc_jLabelTruststorePath.insets = new Insets(0, 0, 5, 5);
	gbc_jLabelTruststorePath.gridx = 0;
	gbc_jLabelTruststorePath.gridy = 2;
	add(getJLabelTruststorePath(), gbc_jLabelTruststorePath);
	GridBagConstraints gbc_jTextFieldTrustStorePath = new GridBagConstraints();
	gbc_jTextFieldTrustStorePath.insets = new Insets(0, 0, 0, 5);
	gbc_jTextFieldTrustStorePath.gridwidth = 2;
	gbc_jTextFieldTrustStorePath.fill = GridBagConstraints.HORIZONTAL;
	gbc_jTextFieldTrustStorePath.gridx = 1;
	gbc_jTextFieldTrustStorePath.gridy = 2;
	add(getJTextFieldTrustStorePath(), gbc_jTextFieldTrustStorePath);
}
 
开发者ID:EnFlexIT,项目名称:AgentWorkbench,代码行数:58,代码来源:JPanelMTPConfig.java

示例5: createProtocolPanel

public JPanel createProtocolPanel() {
	JPanel protocolPanel = new VerticalPanel();
	protocolPanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), "Protocols"));
	
	JPanel pPanel = new HorizontalPanel();
	//pPanel.setLayout(new GridLayout(1, 2));

	protocols = new JLabeledChoice("Protocols:", new String[] { "TCP", "SSL" }, true, false);
	//JComboBox<String> component = (JComboBox) protocols.getComponentList().get(1);
	//component.setSize(new Dimension(40, component.getHeight()));
	protocols.addChangeListener(this);
	pPanel.add(protocols, BorderLayout.WEST);

	dualAuth.setSelected(false);
	dualAuth.setFont(null);
	dualAuth.setVisible(false);
	dualAuth.addChangeListener(this);
	pPanel.add(dualAuth, BorderLayout.CENTER);

	JPanel panel = new JPanel(new GridBagLayout());
	GridBagConstraints c = new GridBagConstraints();
	c.anchor = GridBagConstraints.SOUTHWEST;
	
	c.gridx = 0;
	c.gridy = 0;
	c.gridwidth = 2;
	panel.add(certificationFilePath1, c);
	certificationFilePath1.setVisible(false);

	browse1 = new JButton(JMeterUtils.getResString("browse"));
	browse1.setActionCommand(BROWSE1);
	browse1.addActionListener(this);
	browse1.setVisible(false);
	
	c.gridx = 2;
	c.gridy = 0;
	c.gridwidth = 1;
	panel.add(browse1, c);
	
	c.gridx = 3;
	c.gridy = 0;
	c.gridwidth = 2;
	panel.add(tksPassword, c);
	tksPassword.setVisible(false);
	
	certificationFilePath2.setVisible(false);

	//c.weightx = 0.0;
	c.gridx = 0;
	c.gridy = 1;
	c.gridwidth = 2;
	panel.add(certificationFilePath2, c);

	browse2 = new JButton(JMeterUtils.getResString("browse"));
	browse2.setActionCommand(BROWSE2);
	browse2.addActionListener(this);
	browse2.setVisible(false);
	
	c.gridx = 2;
	c.gridy = 1;
	c.gridwidth = 1;
	panel.add(browse2, c);
	
	c.gridx = 3;
	c.gridy = 1;
	panel.add(cksPassword, c);
	cksPassword.setVisible(false);
	
	protocolPanel.add(pPanel);
	protocolPanel.add(panel);
	
	return protocolPanel;
}
 
开发者ID:emqtt,项目名称:mqtt-jmeter,代码行数:73,代码来源:CommonConnUI.java


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