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


Java GridBagConstraints.PAGE_START属性代码示例

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


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

示例1: DetectorPanel

public DetectorPanel(){
	setLayout(new GridBagLayout());
	GridBagConstraints c = new GridBagConstraints();
	setPreferredSize(new Dimension(250,130));
	setBackground(Color.WHITE);

	this.detectorLabel= new JLabel("OBRAZ DETEKTORA");
	c.gridx = 0;
	c.gridy = 0;
	c.anchor=GridBagConstraints.PAGE_START;
	this.detectorLabel.setFont(this.header);
	this.add(this.detectorLabel,c);

	this.detectorImage = new DetectorImage();
	c.gridy = 1;
	c.insets = new Insets(5,0,5,0);
	this.add(this.detectorImage,c);

}
 
开发者ID:Tosbert,项目名称:FizeauExperimentSimulation,代码行数:19,代码来源:DetectorPanel.java

示例2: setComponentArea

private void setComponentArea() {
	compArea.removeAll();
	GridBagConstraints c = new GridBagConstraints();
	c.fill = GridBagConstraints.HORIZONTAL;
	c.ipadx = 4;
	c.ipady = 2;
	c.anchor = GridBagConstraints.PAGE_START;
	c.gridy = -1;

	int i = 0;
	for (SNESButton b : SNESButton.values()) {
		JLabel lbl = new JLabel(b.name);
		CompWrapper k = activeController.list[i];
		list[i++] = k;
		c.gridy++;
		c.gridx = 0;
		compArea.add(lbl, c);
		c.gridx = 1;
		compArea.add(k.text, c);
	}
	revalidate();
	repaint();
}
 
开发者ID:fatmanspanda,项目名称:ALTTPMenuPractice,代码行数:23,代码来源:ControlMapper.java

示例3: RunButtonPanel

public RunButtonPanel() {

		setLayout(new GridBagLayout());
		GridBagConstraints c = new GridBagConstraints();
		setPreferredSize(new Dimension(300,150));
		setBackground(Color.WHITE);

		this.fizeauButton =new JButton("Zrób to jak Fizeau");
		c.gridx = 0;
		c.gridy = 0;
		c.anchor=GridBagConstraints.PAGE_START;
		this.fizeauButton.setFont(this.mainFont);
		this.fizeauButton.setPreferredSize(new Dimension(200, 35));
		this.add(this.fizeauButton,c);

		this.runButton = new JButton ("START/ STOP");
		c.gridy = 1;
		c.insets = new Insets(10,0,0,0);
		this.runButton.setFont(this.mainFont);
		this.runButton.setPreferredSize(new Dimension(200, 35));
		this.add(this.runButton,c);

		this.saveButton = new JButton("Zapisz do pliku tekstowego");
		c.gridy = 2;
		this.saveButton.setFont(mainFont);
		this.saveButton.setPreferredSize(new Dimension(200, 35));
		this.add(saveButton,c); 
	}
 
开发者ID:Tosbert,项目名称:FizeauExperimentSimulation,代码行数:28,代码来源:RunButtonPanel.java

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

示例5: insertLabel

private void insertLabel(String label) {
    GridBagConstraints c = new GridBagConstraints();
    c.gridy = nextrow;
    c.anchor = GridBagConstraints.PAGE_START;
    c.fill = GridBagConstraints.HORIZONTAL;
    c.gridx = 0;
    c.weightx = 0.0;
    c.ipady = 5;
    c.ipadx = 10;
    add(new JLabel(label), c);
}
 
开发者ID:The-Retired-Programmer,项目名称:nbreleaseplugin,代码行数:11,代码来源:ViewerPanel.java

示例6: insertValue

private void insertValue(JComponent value) {
    GridBagConstraints c = new GridBagConstraints();
    c.gridy = nextrow++;
    c.anchor = GridBagConstraints.PAGE_START;
    c.fill = GridBagConstraints.HORIZONTAL;
    c.gridx = 1;
    c.weightx = 1.0;
    c.ipady = 5;
    c.ipadx = 10;
    add(value, c);
}
 
开发者ID:The-Retired-Programmer,项目名称:nbreleaseplugin,代码行数:11,代码来源:ViewerPanel.java

示例7: VariableTab

VariableTab(VariableList data) {
	this.data = data;

	list.setModel(new VariableListModel(data));
	list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
	list.addListSelectionListener(myListener);
	remove.addActionListener(myListener);
	moveUp.addActionListener(myListener);
	moveDown.addActionListener(myListener);
	add.addActionListener(myListener);
	rename.addActionListener(myListener);
	field.addActionListener(myListener);
	field.getDocument().addDocumentListener(myListener);

	JScrollPane listPane = new JScrollPane(list, ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS,
			ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
	listPane.setPreferredSize(new Dimension(100, 100));

	JPanel topPanel = new JPanel(new GridLayout(3, 1));
	topPanel.add(remove);
	topPanel.add(moveUp);
	topPanel.add(moveDown);

	JPanel fieldPanel = new JPanel();
	fieldPanel.add(rename);
	fieldPanel.add(add);

	GridBagLayout gb = new GridBagLayout();
	GridBagConstraints gc = new GridBagConstraints();
	setLayout(gb);

	gc.insets = new Insets(10, 10, 0, 10);
	gc.fill = GridBagConstraints.BOTH;
	gc.weightx = 1.0;
	gb.setConstraints(listPane, gc);
	add(listPane);

	gc.fill = GridBagConstraints.NONE;
	gc.anchor = GridBagConstraints.PAGE_START;
	gc.weightx = 0.0;
	gb.setConstraints(topPanel, gc);
	add(topPanel);

	gc.gridwidth = GridBagConstraints.REMAINDER;
	gc.gridx = 0;
	gc.gridy = GridBagConstraints.RELATIVE;
	gc.fill = GridBagConstraints.HORIZONTAL;
	gb.setConstraints(field, gc);
	field.setBorder(BorderFactory.createLineBorder(new Color(130, 135, 144)));
	add(field);

	gb.setConstraints(fieldPanel, gc);
	add(fieldPanel);

	gc.fill = GridBagConstraints.HORIZONTAL;
	gb.setConstraints(error, gc);
	add(error);

	if (!data.isEmpty())
		list.setSelectedValue(data.get(0), true);
	computeEnabled();
}
 
开发者ID:LogisimIt,项目名称:Logisim,代码行数:62,代码来源:VariableTab.java


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