當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。