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


Java GridBagConstraints.NORTH属性代码示例

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


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

示例1: addCondition

/**
 * Adds a condition to the filter.
 *
 * @param revalidate true = invalidate() will be called
 * @param condition a condition or null
 */
private ConditionPanel addCondition(boolean revalidate, AppliedFilterCondition condition) {
    GridBagConstraints gridBagConstraints = new GridBagConstraints();
    gridBagConstraints.gridwidth = GridBagConstraints.REMAINDER;
    gridBagConstraints.fill = GridBagConstraints.HORIZONTAL;
    gridBagConstraints.anchor = GridBagConstraints.NORTH;
    gridBagConstraints.insets = new Insets(6, 0, 0, 0);
    gridBagConstraints.weightx = 1.0;
    ConditionPanel panel = new ConditionPanel(filter, condition);
    panel.addPropertyChangeListener(FilterCondition.PROP_VALUE_VALID, this);
    panel.setBackground((Color)UIManager.get("Table.background")); //NOI18N
    conditionsPanel.add(panel, gridBagConstraints);
    if (revalidate) {
        invalidate();
        getParent().validate();
        repaint();
    }
    putClientProperty(FilterCondition.PROP_VALUE_VALID, Boolean.valueOf(isValueValid()));
    return panel;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:25,代码来源:KeywordsPanel.java

示例2: initialize

/**
 * Initialize.
 */
private void initialize() {
	GridBagLayout gridBagLayout = new GridBagLayout();
	gridBagLayout.columnWidths = new int[] { 0, 0 };
	gridBagLayout.rowHeights = new int[] { 0, 0, 0 };
	gridBagLayout.columnWeights = new double[] { 1.0, Double.MIN_VALUE };
	gridBagLayout.rowWeights = new double[] { 0.0, 0.0, Double.MIN_VALUE };
	setLayout(gridBagLayout);
	GridBagConstraints gbc_jPanelSimulationEnvironment = new GridBagConstraints();
	gbc_jPanelSimulationEnvironment.insets = new Insets(10, 10, 0, 0);
	gbc_jPanelSimulationEnvironment.anchor = GridBagConstraints.NORTH;
	gbc_jPanelSimulationEnvironment.fill = GridBagConstraints.HORIZONTAL;
	gbc_jPanelSimulationEnvironment.gridx = 0;
	gbc_jPanelSimulationEnvironment.gridy = 0;
	add(getJPanelSimulationEnvironment(), gbc_jPanelSimulationEnvironment);
	GridBagConstraints gbc_jPanelTimeModelSelection = new GridBagConstraints();
	gbc_jPanelTimeModelSelection.anchor = GridBagConstraints.WEST;
	gbc_jPanelTimeModelSelection.insets = new Insets(10, 10, 0, 0);
	gbc_jPanelTimeModelSelection.fill = GridBagConstraints.VERTICAL;
	gbc_jPanelTimeModelSelection.gridx = 0;
	gbc_jPanelTimeModelSelection.gridy = 1;
	add(getJPanelTimeModelSelection(), gbc_jPanelTimeModelSelection);

}
 
开发者ID:EnFlexIT,项目名称:AgentWorkbench,代码行数:26,代码来源:EnvironmentModel.java

示例3: initialize

/** Initializes this. */
protected void initialize(){
	
	GridBagLayout gridBagLayout = new GridBagLayout();
	gridBagLayout.columnWidths = new int[]{0, 0, 0};
	gridBagLayout.rowHeights = new int[]{0, 0};
	gridBagLayout.columnWeights = new double[]{1.0, 0.0, Double.MIN_VALUE};
	gridBagLayout.rowWeights = new double[]{1.0, Double.MIN_VALUE};
	setLayout(gridBagLayout);
	
	GridBagConstraints gbc_scrollPane = new GridBagConstraints();
	gbc_scrollPane.insets = new Insets(0, 0, 0, 0);
	gbc_scrollPane.fill = GridBagConstraints.BOTH;
	gbc_scrollPane.gridx = 0;
	gbc_scrollPane.gridy = 0;
	add(getScrollPane(), gbc_scrollPane);
	
	GridBagConstraints gbc_toolBar = new GridBagConstraints();
	gbc_toolBar.anchor = GridBagConstraints.NORTH;
	gbc_toolBar.gridx = 1;
	gbc_toolBar.gridy = 0;
	add(getToolBar(), gbc_toolBar);
}
 
开发者ID:EnFlexIT,项目名称:AgentWorkbench,代码行数:23,代码来源:TableTab.java

示例4: getObject

protected GridBagConstraints getObject() {
    GridBagConstraints gbc = new GridBagConstraints();
    gbc.gridx = 1;
    gbc.gridy = 2;
    gbc.gridwidth = 3;
    gbc.gridheight = 4;
    gbc.weightx = 0.1;
    gbc.weighty = 0.2;
    gbc.anchor = GridBagConstraints.NORTH;
    gbc.fill = GridBagConstraints.VERTICAL;
    gbc.insets.top = 1;
    gbc.insets.left = 2;
    gbc.insets.right = 3;
    gbc.insets.bottom = 4;
    gbc.ipadx = -1;
    gbc.ipady = -2;
    return gbc;
}
 
开发者ID:lambdalab-mirror,项目名称:jdk8u-jdk,代码行数:18,代码来源:java_awt_GridBagConstraints.java

示例5: initializeButtons

private void initializeButtons(){
	this.btnVoltar = new JButton("< Voltar");
	GridBagConstraints gbc_btnVoltar = new GridBagConstraints();
	gbc_btnVoltar.insets = new Insets(0, 0, 5, 5);
	gbc_btnVoltar.gridx = 1;
	gbc_btnVoltar.gridy = 1;
	this.panelFirst.add(this.btnVoltar, gbc_btnVoltar);
	
	this.btnLocalidade = new JButton("Localidade");
	GridBagConstraints gbc_lblLocalidade = new GridBagConstraints();
	gbc_lblLocalidade.fill = GridBagConstraints.HORIZONTAL;
	gbc_lblLocalidade.gridwidth = 2;
	gbc_lblLocalidade.anchor = GridBagConstraints.NORTH;
	gbc_lblLocalidade.insets = new Insets(0, 0, 5, 0);
	gbc_lblLocalidade.gridx = 0;
	gbc_lblLocalidade.gridy = 2;
	this.panelSecond.add(this.btnLocalidade, gbc_lblLocalidade);
	
	this.btnRota = new JButton("Rota");
	GridBagConstraints gbc_btnRota = new GridBagConstraints();
	gbc_btnRota.fill = GridBagConstraints.HORIZONTAL;
	gbc_btnRota.gridwidth = 2;
	gbc_btnRota.insets = new Insets(0, 0, 5, 0);
	gbc_btnRota.gridx = 0;
	gbc_btnRota.gridy = 5;
	this.panelSecond.add(this.btnRota, gbc_btnRota);
	
	this.btnRota.addActionListener(this);
	this.btnVoltar.addActionListener(this);
	this.btnLocalidade.addActionListener(this);
}
 
开发者ID:cjlcarvalho,项目名称:LogisticApp,代码行数:31,代码来源:CadastroFrame.java

示例6: UpdateFrame

public UpdateFrame(Program p, String version) {
	
	super("Update");
	
	this.p = p;
	this.version = version;
	
	initializeComponents();
	addActionListeners();

	setLayout(new GridBagLayout());
	GridBagConstraints gbc	= new GridBagConstraints(); 
	gbc.weightx				= 1;
	gbc.weighty				= 0;
	gbc.gridx				= 0;
	gbc.gridy				= 0;
	gbc.gridwidth 			= 3;
	gbc.anchor 				= GridBagConstraints.NORTH;
	gbc.fill				= GridBagConstraints.HORIZONTAL;
	gbc.insets = new Insets(5,5,5,5);
	
	add(infoPane, gbc);
	gbc.gridy++;
	
	gbc.fill				= GridBagConstraints.NONE;

	
	add(updateButton, gbc);
	
	setAlwaysOnTop(true);
	setSize(450, 150);
	setResizable(false);
}
 
开发者ID:CalebKussmaul,项目名称:GIFKR,代码行数:33,代码来源:UpdateFrame.java

示例7: 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

示例8: 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

示例9: initialize

/**
 * Initialize.
 */
private void initialize() {

	GridBagLayout gridBagLayout = new GridBagLayout();
	gridBagLayout.columnWidths = new int[] { 0, 0 };
	gridBagLayout.rowHeights = new int[] { 0, 0, 0, 0, 0 };
	gridBagLayout.columnWeights = new double[] { 1.0, Double.MIN_VALUE };
	gridBagLayout.rowWeights = new double[] { 0.0, 1.0, 0.0, 0.0, Double.MIN_VALUE };
	getContentPane().setLayout(gridBagLayout);
	GridBagConstraints gbc_jLabelHeader = new GridBagConstraints();
	gbc_jLabelHeader.anchor = GridBagConstraints.NORTH;
	gbc_jLabelHeader.fill = GridBagConstraints.HORIZONTAL;
	gbc_jLabelHeader.insets = new Insets(10, 10, 0, 10);
	gbc_jLabelHeader.gridx = 0;
	gbc_jLabelHeader.gridy = 0;
	getContentPane().add(getJLabelHeader(), gbc_jLabelHeader);
	GridBagConstraints gbc_jScrollPaneFeaturesList = new GridBagConstraints();
	gbc_jScrollPaneFeaturesList.fill = GridBagConstraints.BOTH;
	gbc_jScrollPaneFeaturesList.insets = new Insets(5, 10, 0, 10);
	gbc_jScrollPaneFeaturesList.gridx = 0;
	gbc_jScrollPaneFeaturesList.gridy = 1;
	getContentPane().add(getJScrollPaneFeaturesList(), gbc_jScrollPaneFeaturesList);
	GridBagConstraints gbc_jLabelInfo = new GridBagConstraints();
	gbc_jLabelInfo.anchor = GridBagConstraints.WEST;
	gbc_jLabelInfo.insets = new Insets(5, 10, 0, 10);
	gbc_jLabelInfo.gridx = 0;
	gbc_jLabelInfo.gridy = 2;
	getContentPane().add(getLabelInfo(), gbc_jLabelInfo);
	GridBagConstraints gbc_jPanelButtons = new GridBagConstraints();
	gbc_jPanelButtons.insets = new Insets(10, 10, 15, 10);
	gbc_jPanelButtons.anchor = GridBagConstraints.NORTH;
	gbc_jPanelButtons.fill = GridBagConstraints.HORIZONTAL;
	gbc_jPanelButtons.gridx = 0;
	gbc_jPanelButtons.gridy = 3;
	getContentPane().add(getJPanelButtons(), gbc_jPanelButtons);

	this.setTitle(Language.translate("Features auswählen"));
	this.setSize(800, 450);
	this.setModal(true);
	this.setLocationRelativeTo(null);
	this.registerEscapeKeyStroke();
	this.setVisible(true);
}
 
开发者ID:EnFlexIT,项目名称:AgentWorkbench,代码行数:45,代码来源:FeatureSelectionDialog.java

示例10: initialize

/**
 * Initialize the contents of the dialog.
 */
private void initialize() {
	this.setTitle(Language.translate("Agent.GUI: HTTPS Configuration", Language.EN));
	this.setIconImage(GlobalInfo.getInternalImage("AgentGUI.png"));
	this.setBounds(100, 100, 820, 590);
	this.setLocationRelativeTo(null);
	this.setModal(true);
	this.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
	this.addWindowListener(new WindowAdapter() {
		@Override
		public void windowClosing(WindowEvent evt) {
			canceled = true;
			setVisible(false);
		}
	});
	GridBagLayout gridBagLayout = new GridBagLayout();
	gridBagLayout.columnWidths = new int[] { 0, 0, 0 };
	gridBagLayout.rowHeights = new int[] { 0, 0, 0, 0 };
	gridBagLayout.columnWeights = new double[] { 1.0, 1.0, Double.MIN_VALUE };
	gridBagLayout.rowWeights = new double[] { 0.0, 1.0, 0.0, Double.MIN_VALUE };
	getContentPane().setLayout(gridBagLayout);
	GridBagConstraints gbc_jPanelHeader = new GridBagConstraints();
	gbc_jPanelHeader.gridwidth = 2;
	gbc_jPanelHeader.insets = new Insets(10, 10, 5, 10);
	gbc_jPanelHeader.anchor = GridBagConstraints.NORTH;
	gbc_jPanelHeader.fill = GridBagConstraints.HORIZONTAL;
	gbc_jPanelHeader.gridx = 0;
	gbc_jPanelHeader.gridy = 0;
	this.getContentPane().add(getJPanelHeader(), gbc_jPanelHeader);
	GridBagConstraints gbc_jScrollPaneKeyStore = new GridBagConstraints();
	gbc_jScrollPaneKeyStore.fill = GridBagConstraints.BOTH;
	gbc_jScrollPaneKeyStore.insets = new Insets(10, 10, 0, 10);
	gbc_jScrollPaneKeyStore.gridx = 0;
	gbc_jScrollPaneKeyStore.gridy = 1;
	this.getContentPane().add(getJPanelBody(), gbc_jScrollPaneKeyStore);
	GridBagConstraints gbc_jScrollPaneTrustStore = new GridBagConstraints();
	gbc_jScrollPaneTrustStore.insets = new Insets(10, 0, 0, 10);
	gbc_jScrollPaneTrustStore.fill = GridBagConstraints.BOTH;
	gbc_jScrollPaneTrustStore.gridx = 1;
	gbc_jScrollPaneTrustStore.gridy = 1;
	getContentPane().add(getJScrollPaneTrustStore(), gbc_jScrollPaneTrustStore);
	GridBagConstraints gbc_jPanelFooter = new GridBagConstraints();
	gbc_jPanelFooter.gridwidth = 2;
	gbc_jPanelFooter.insets = new Insets(10, 10, 15, 10);
	gbc_jPanelFooter.anchor = GridBagConstraints.NORTH;
	gbc_jPanelFooter.fill = GridBagConstraints.HORIZONTAL;
	gbc_jPanelFooter.gridx = 0;
	gbc_jPanelFooter.gridy = 2;
	this.getContentPane().add(getJPanelFooter(), gbc_jPanelFooter);
	this.setVisible(true);
}
 
开发者ID:EnFlexIT,项目名称:AgentWorkbench,代码行数:53,代码来源:HttpsConfigWindow.java

示例11: initializePanels

private void initializePanels(){
	
	/* PANELFIRST INITIALIZATION */
	
	this.panelFirst = new JPanel();
	this.panelFirst.setBorder(new BevelBorder(BevelBorder.LOWERED, null, null, null, null));
	
	GridBagConstraints gbc_panel = new GridBagConstraints();
	gbc_panel.fill = GridBagConstraints.BOTH;
	gbc_panel.insets = new Insets(0, 0, 5, 0);
	gbc_panel.gridx = 0;
	gbc_panel.gridy = 0;
	
	this.contentPane.add(this.panelFirst, gbc_panel);
	
	GridBagLayout gbl_panel = new GridBagLayout();
	gbl_panel.columnWidths = new int[]{0, 0, 0, 0, 0, 0, 0};
	gbl_panel.rowHeights = new int[]{0, 0, 0, 0};
	gbl_panel.columnWeights = new double[]{0.0, 0.0, 0.0, 0.0, 0.0, 0.0, Double.MIN_VALUE};
	gbl_panel.rowWeights = new double[]{0.0, 0.0, 0.0, Double.MIN_VALUE};
	
	this.panelFirst.setLayout(gbl_panel);
	
	Component verticalStrut_1 = Box.createVerticalStrut(20);
	GridBagConstraints gbc_verticalStrut_1 = new GridBagConstraints();
	gbc_verticalStrut_1.insets = new Insets(0, 0, 5, 5);
	gbc_verticalStrut_1.gridx = 5;
	gbc_verticalStrut_1.gridy = 0;
	
	this.panelFirst.add(verticalStrut_1, gbc_verticalStrut_1);
	
	Component horizontalStrut = Box.createHorizontalStrut(20);
	GridBagConstraints gbc_horizontalStrut = new GridBagConstraints();
	gbc_horizontalStrut.insets = new Insets(0, 0, 5, 5);
	gbc_horizontalStrut.gridx = 0;
	gbc_horizontalStrut.gridy = 1;
	
	this.panelFirst.add(horizontalStrut, gbc_horizontalStrut);
	
	/* END PANELFIRST INITIALIZATION */
	
	/* PANELSECOND INITIALIZATION */
	
	this.panelSecond = new JPanel();
	this.panelSecond.setSize(282, 300);
	
	GridBagConstraints gbc_panel_1 = new GridBagConstraints();
	gbc_panel_1.anchor = GridBagConstraints.NORTH;
	gbc_panel_1.fill = GridBagConstraints.HORIZONTAL;
	gbc_panel_1.gridx = 0;
	gbc_panel_1.gridy = 1;
	
	this.contentPane.add(this.panelSecond, gbc_panel_1);
	
	GridBagLayout gbl_panel_1 = new GridBagLayout();
	gbl_panel_1.columnWidths = new int[]{60, 77, 0};
	gbl_panel_1.rowHeights = new int[]{36, 0, 0, 0, 0, 0, 0, 0, 15, 0};
	gbl_panel_1.columnWeights = new double[]{0.0, 1.0, Double.MIN_VALUE};
	gbl_panel_1.rowWeights = new double[]{0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, Double.MIN_VALUE};
	
	this.panelSecond.setLayout(gbl_panel_1);
	
	Component verticalStrut = Box.createVerticalStrut(20);
	GridBagConstraints gbc_verticalStrut = new GridBagConstraints();
	gbc_verticalStrut.insets = new Insets(0, 0, 5, 0);
	gbc_verticalStrut.gridx = 1;
	gbc_verticalStrut.gridy = 3;
	
	this.panelSecond.add(verticalStrut, gbc_verticalStrut);
	
	Component verticalStrut_2 = Box.createVerticalStrut(20);
	GridBagConstraints gbc_verticalStrut_2 = new GridBagConstraints();
	gbc_verticalStrut_2.insets = new Insets(0, 0, 5, 0);
	gbc_verticalStrut_2.gridx = 1;
	gbc_verticalStrut_2.gridy = 4;
	
	this.panelSecond.add(verticalStrut_2, gbc_verticalStrut_2);
	
	/* END PANELSECOND INITIALIZATION */
}
 
开发者ID:cjlcarvalho,项目名称:LogisticApp,代码行数:80,代码来源:CadastroFrame.java

示例12: ShangPinChaXun

public ShangPinChaXun() {
	super();
	setIconifiable(true);
	setClosable(true);
	setTitle("��Ʒ��Ϣ��ѯ");
	getContentPane().setLayout(new GridBagLayout());
	setBounds(100, 100, 609, 375);

	table = new JTable();
	table.setEnabled(false);
	table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
	final DefaultTableModel dftm = (DefaultTableModel) table.getModel();
	String[] tableHeads = new String[]{"�ͻ�ID", "��Ʒ����", "���", "����", "��λ",
			"���", "��װ", "����", "��׼�ĺ�", "��Ӧ��ȫ��", "��ע",};
	dftm.setColumnIdentifiers(tableHeads);

	final JScrollPane scrollPane = new JScrollPane(table);
	final GridBagConstraints gridBagConstraints_6 = new GridBagConstraints();
	gridBagConstraints_6.weighty = 1.0;
	gridBagConstraints_6.anchor = GridBagConstraints.NORTH;
	gridBagConstraints_6.insets = new Insets(0, 10, 0, 10);
	gridBagConstraints_6.fill = GridBagConstraints.BOTH;
	gridBagConstraints_6.gridwidth = 6;
	gridBagConstraints_6.gridy = 1;
	gridBagConstraints_6.gridx = 0;
	getContentPane().add(scrollPane, gridBagConstraints_6);

	setupComponet(new JLabel(" ѡ���ѯ������"), 0, 0, 1, 1, false);
	conditionName = new JComboBox();
	conditionName.setModel(new DefaultComboBoxModel(new String[]{"��Ʒ����",
			"��Ӧ��ȫ��", "����", "���"}));
	setupComponet(conditionName, 1, 0, 1, 30, true);

	conditionOperation = new JComboBox();
	conditionOperation.setModel(new DefaultComboBoxModel(new String[]{"����",
			"����"}));
	setupComponet(conditionOperation, 2, 0, 1, 30, true);

	conditionContent = new JTextField();
	setupComponet(conditionContent, 3, 0, 1, 140, true);

	final JButton queryButton = new JButton();
	queryButton.addActionListener(new QueryAction(dftm));
	setupComponet(queryButton, 4, 0, 1, 1, false);
	queryButton.setText("��ѯ");

	final JButton showAllButton = new JButton();
	showAllButton.addActionListener(new ActionListener() {
		public void actionPerformed(final ActionEvent e) {
			conditionContent.setText("");
			List list = Dao.getSpInfos();
			updateTable(list, dftm);
		}
	});
	setupComponet(showAllButton, 5, 0, 1, 1, false);
	showAllButton.setText("��ʾȫ������");
}
 
开发者ID:Edward7Zhang,项目名称:SuperMarketManageSystem,代码行数:57,代码来源:ShangPinChaXun.java

示例13: XiaoShouPaiHang

public XiaoShouPaiHang() {
	setIconifiable(true);
	setClosable(true);
	setTitle("��������");
	getContentPane().setLayout(new GridBagLayout());
	setBounds(100, 100, 650, 375);

	final JLabel label_1 = new JLabel();
	label_1.setText("��");
	final GridBagConstraints gridBagConstraints_8 = new GridBagConstraints();
	gridBagConstraints_8.anchor = GridBagConstraints.EAST;
	gridBagConstraints_8.gridy = 0;
	gridBagConstraints_8.gridx = 0;
	getContentPane().add(label_1, gridBagConstraints_8);

	year = new JComboBox();
	for (int i = 1981, j = 0; i <= date.get(Calendar.YEAR) + 1; i++, j++) {
		year.addItem(i);
		if (i == date.get(Calendar.YEAR))
			year.setSelectedIndex(j);
	}
	year.setPreferredSize(new Dimension(100, 21));
	setupComponet(year, 1, 0, 1, 90, true);

	setupComponet(new JLabel("��"), 2, 0, 1, 1, false);

	month = new JComboBox();
	for (int i = 1; i <= 12; i++) {
		month.addItem(String.format("%02d", i));
		if (date.get(Calendar.MONTH) == i)
			month.setSelectedIndex(i - 1);
	}
	month.setPreferredSize(new Dimension(100, 21));
	setupComponet(month, 3, 0, 1, 30, true);

	setupComponet(new JLabel(" �·ݵ�������Ϣ����"), 4, 0, 1, 1, false);
	condition = new JComboBox();
	condition.setModel(new DefaultComboBoxModel(new String[]{"���", "����"}));
	setupComponet(condition, 5, 0, 1, 30, true);

	setupComponet(new JLabel(" ����"), 6, 0, 1, 1, false);

	operation = new JComboBox();
	operation.setModel(new DefaultComboBoxModel(
			new String[]{"��������", "��������"}));
	setupComponet(operation, 7, 0, 1, 30, true);

	okButton = new JButton();
	okButton.addActionListener(new OkAction());
	setupComponet(okButton, 8, 0, 1, 1, false);
	okButton.setText("ȷ��");

	final JScrollPane scrollPane = new JScrollPane();
	final GridBagConstraints gridBagConstraints_6 = new GridBagConstraints();
	gridBagConstraints_6.weighty = 1.0;
	gridBagConstraints_6.anchor = GridBagConstraints.NORTH;
	gridBagConstraints_6.insets = new Insets(0, 10, 5, 10);
	gridBagConstraints_6.fill = GridBagConstraints.BOTH;
	gridBagConstraints_6.gridwidth = 9;
	gridBagConstraints_6.gridy = 1;
	gridBagConstraints_6.gridx = 0;
	getContentPane().add(scrollPane, gridBagConstraints_6);

	table = new JTable();
	table.setEnabled(false);
	table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
	dftm = (DefaultTableModel) table.getModel();
	String[] tableHeads = new String[]{"��Ʒ���", "��Ʒ����", "���۽��", "��������",
			"���", "����", "��λ", "���", "��װ", "����", "��׼�ĺ�","���","��Ӧ��"};
	dftm.setColumnIdentifiers(tableHeads);
	scrollPane.setViewportView(table);
}
 
开发者ID:Edward7Zhang,项目名称:SuperMarketManageSystem,代码行数:72,代码来源:XiaoShouPaiHang.java

示例14: GongYingShangChaXun

public GongYingShangChaXun() {
	setMaximizable(true);
	setIconifiable(true);
	setClosable(true);
	setTitle("��Ӧ����Ϣ��ѯ");
	getContentPane().setLayout(new GridBagLayout());
	setBounds(100, 100, 609, 375);

	table = new JTable();
	table.setEnabled(false);
	table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
	final DefaultTableModel dftm = (DefaultTableModel) table.getModel();
	String[] tableHeads = new String[]{"��Ӧ��ID", "��Ӧ��ȫ��", "���", "��������",
			"��ַ", "�绰", "����", "��ϵ��", "��ϵ�˵绰", "��������", "��������"};
	dftm.setColumnIdentifiers(tableHeads);

	final JScrollPane scrollPane = new JScrollPane(table);
	final GridBagConstraints gridBagConstraints_6 = new GridBagConstraints();
	gridBagConstraints_6.weighty = 1.0;
	gridBagConstraints_6.anchor = GridBagConstraints.NORTH;
	gridBagConstraints_6.insets = new Insets(0, 10, 0, 10);
	gridBagConstraints_6.fill = GridBagConstraints.BOTH;
	gridBagConstraints_6.gridwidth = 6;
	gridBagConstraints_6.gridy = 1;
	gridBagConstraints_6.gridx = 0;
	getContentPane().add(scrollPane, gridBagConstraints_6);

	setupComponet(new JLabel(" ѡ���ѯ������"), 0, 0, 1, 1, false);
	conditionName = new JComboBox();
	conditionName.setModel(new DefaultComboBoxModel(new String[]{"��Ӧ��ȫ��",
			"���"}));
	setupComponet(conditionName, 1, 0, 1, 30, true);

	conditionOperation = new JComboBox();
	conditionOperation.setModel(new DefaultComboBoxModel(new String[]{"����",
			"����"}));
	setupComponet(conditionOperation, 2, 0, 1, 30, true);

	conditionContent = new JTextField();
	setupComponet(conditionContent, 3, 0, 1, 140, true);

	final JButton queryButton = new JButton();
	queryButton.addActionListener(new queryAction(dftm));
	setupComponet(queryButton, 4, 0, 1, 1, false);
	queryButton.setText("��ѯ");

	final JButton showAllButton = new JButton();
	showAllButton.addActionListener(new ActionListener() {
		public void actionPerformed(final ActionEvent e) {
			conditionContent.setText("");
			List list = Dao.getGysInfos();
			updateTable(list, dftm);
		}
	});
	setupComponet(showAllButton, 5, 0, 1, 1, false);
	showAllButton.setText("��ʾȫ������");
}
 
开发者ID:Edward7Zhang,项目名称:SuperMarketManageSystem,代码行数:57,代码来源:GongYingShangChaXun.java

示例15: showReport

/**
 *  Shows a message dialog with the unpacked/overriden files.
 * 
 * @param pluginWorkspaceAccess  Entry point for accessing the DITA Maps area.
 * @param list  The relative paths of the unzipped files.
 * @throws IOException  Problems reading the files.
 */
private void showReport(final StandalonePluginWorkspace pluginWorkspaceAccess,
    ArrayList<String> list) throws IOException {
  final PluginResourceBundle resourceBundle = pluginWorkspaceAccess.getResourceBundle();

  // Present a log with the overridden files.
  if(list != null && !list.isEmpty()){
    JTextArea text = new JTextArea(10, 40);

    // Iterate with an index and put a new line
    //    for all lines except the first one. 
    text.append(list.get(0));
    for(int i = 1; i < list.size(); i++){
      text.append("\n");
      text.append(list.get(i));
    }
    text.setLineWrap(true);
    text.setWrapStyleWord(true);
    text.setEditable(false);

    JScrollPane scroll = new JScrollPane(text);
    scroll.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED);

    JPanel panel = new JPanel(new GridBagLayout());

    GridBagConstraints gbcLabel = new GridBagConstraints();
    gbcLabel.gridx = 0;
    gbcLabel.gridy = 0;
    gbcLabel.gridwidth = 1;
    gbcLabel.gridheight = 1;
    gbcLabel.weightx = 0;
    gbcLabel.weighty = 0;
    gbcLabel.fill = GridBagConstraints.HORIZONTAL;
    gbcLabel.anchor = GridBagConstraints.NORTH;

    panel.add(new JLabel(resourceBundle.getMessage(Tags.SHOW_REPORT_LABEL)), gbcLabel);

    GridBagConstraints gbcScroll = new GridBagConstraints();
    gbcScroll.gridx = 0;
    gbcScroll.gridy = 1;
    gbcScroll.gridwidth = 1;
    gbcScroll.gridheight = 1;
    gbcScroll.weightx = 0;
    gbcScroll.weighty = 0;
    gbcScroll.fill = GridBagConstraints.BOTH;
    gbcScroll.anchor = GridBagConstraints.LINE_START;
    panel.add(scroll , gbcScroll);


    JOptionPane.showMessageDialog((JFrame) pluginWorkspaceAccess.getParentFrame(), panel, resourceBundle.getMessage(Tags.SHOW_REPORT_TITLE), JOptionPane.INFORMATION_MESSAGE);
  }
  else{
    throw new IOException(resourceBundle.getMessage(Tags.SHOW_REPORT_EXCEPTION_MESSAGE));
  }
}
 
开发者ID:oxygenxml,项目名称:oxygen-dita-translation-package-builder,代码行数:61,代码来源:TranslationPackageBuilderExtension.java


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