當前位置: 首頁>>代碼示例>>Java>>正文


Java GridBagConstraints.REMAINDER屬性代碼示例

本文整理匯總了Java中java.awt.GridBagConstraints.REMAINDER屬性的典型用法代碼示例。如果您正苦於以下問題:Java GridBagConstraints.REMAINDER屬性的具體用法?Java GridBagConstraints.REMAINDER怎麽用?Java GridBagConstraints.REMAINDER使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在java.awt.GridBagConstraints的用法示例。


在下文中一共展示了GridBagConstraints.REMAINDER屬性的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: readSettings

@Override
public void readSettings(WizardDescriptor settings) {           
    sources = null;
    sourcesString = null;
    javadoc = null;
    javadocString = null;
    this.wiz = settings;
    this.component.progressPanel.setVisible (true);
    this.component.progressLabel.setVisible (true);
    
    this.progressHandle = ProgressHandleFactory.createHandle(NbBundle.getMessage(DetectPanel.class,"TXT_PlatfromDetectProgress"));
    this.component.progressPanel.removeAll();
    this.component.progressPanel.setLayout (new GridBagLayout ());
    GridBagConstraints c = new GridBagConstraints ();
    c.gridx = c.gridy = GridBagConstraints.RELATIVE;
    c.gridheight = c.gridwidth = GridBagConstraints.REMAINDER;
    c.fill = GridBagConstraints.HORIZONTAL;
    c.weightx = 1.0;
    JComponent pc = ProgressHandleFactory.createProgressComponent(this.progressHandle);
    ((GridBagLayout)this.component.progressPanel.getLayout ()).setConstraints(pc,c);
    this.component.progressPanel.add (pc);
    this.progressHandle.start ();
    task.schedule(0);
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:24,代碼來源:DetectPanel.java

示例2: addCheckBox

/**
 * Creates and adds a new checkbox to this panel
 * @param selected Is the checkbox initially selected
 * @param endOfRow Is the box last in the row in the layout
 * @return The created checkbox
 */
private JCheckBox addCheckBox(boolean selected, boolean endOfRow) {
	JCheckBox box = new JCheckBox();
	box.setSelected(selected);

	if (endOfRow) {
		c.gridwidth = GridBagConstraints.REMAINDER; // use rest of the line
	}
	else {
		c.gridwidth = 1; // default
	}

	layout.setConstraints(box, c);
	add(box);
	
	return box;
}
 
開發者ID:mdonnyk,項目名稱:the-one-mdonnyk,代碼行數:22,代碼來源:EventLogControlPanel.java

示例3: GeneralPanel

public GeneralPanel() {
    super();

    GridBagLayout gridbag = new GridBagLayout();
    GridBagConstraints c = new GridBagConstraints();

    setLayout(gridbag);

    c.fill = GridBagConstraints.BOTH;
    c.insets = panelInsets;
    c.weightx = 1.0;
    c.weighty = 1.0;

    c.gridwidth = GridBagConstraints.REMAINDER;
    pnlPrintService = new PrintServicePanel();
    addToGB(pnlPrintService, this, gridbag, c);

    c.gridwidth = GridBagConstraints.RELATIVE;
    pnlPrintRange = new PrintRangePanel();
    addToGB(pnlPrintRange, this, gridbag, c);

    c.gridwidth = GridBagConstraints.REMAINDER;
    pnlCopies = new CopiesPanel();
    addToGB(pnlCopies, this, gridbag, c);
}
 
開發者ID:SunburstApps,項目名稱:OpenJSharp,代碼行數:25,代碼來源:ServiceDialog.java

示例4: addSeperatorToPanel

protected void addSeperatorToPanel(JPanel addTarget) {
	if (!(addTarget.getLayout() instanceof GridBagLayout)) {
		throw new RuntimeException("JPanel with GridBagLayout is mandatory!");
	}

	JSeparator separator = new JSeparator(SwingConstants.HORIZONTAL);

	GridBagConstraints itemConstraint = new GridBagConstraints();
	itemConstraint.gridx = GridBagConstraints.RELATIVE;
	itemConstraint.weightx = 1.0;
	itemConstraint.gridwidth = GridBagConstraints.REMAINDER; // end row
	itemConstraint.fill = GridBagConstraints.HORIZONTAL;
	itemConstraint.insets = new Insets(0, 5, 5, 5);

	addTarget.add(separator, itemConstraint);
}
 
開發者ID:transwarpio,項目名稱:rapidminer,代碼行數:16,代碼來源:AbstractConfigurationPanel.java

示例5: GlobalInfoPanel

public GlobalInfoPanel() {
       setFont(new Font("SansSerif", Font.PLAIN, 12));

	constraints = new GridBagConstraints();
	//constraints.fill = GridBagConstraints.BOTH;
	//constraints.insets = new Insets(10, 10, 10, 10);
	setLayout(new GridBagLayout());

       JLabel timestepLabel = new JLabel("Timestep: ");
       constraints.gridx = 0;
       constraints.gridy = 0;
       add(timestepLabel, constraints);
       
       constraints.gridx = 1;
       constraints.gridy = 0;
       constraints.gridwidth = GridBagConstraints.REMAINDER;
       timestepData = new JLabel("Foo");
       add(timestepData, constraints);
}
 
開發者ID:CatherineHa,項目名稱:Proj4,代碼行數:19,代碼來源:GlobalInfoPanel.java

示例6: setupTextFields

private JPanel setupTextFields(JLabel[] labels, Component[] components) {

		// Lay out the text controls and the labels.
		JPanel textControlsPane = new JPanel();
		GridBagLayout gridbag = new GridBagLayout();
		GridBagConstraints c = new GridBagConstraints();

		textControlsPane.setLayout(gridbag);

		addLabelTextRows(labels, components, gridbag, textControlsPane);

		c.gridwidth = GridBagConstraints.REMAINDER; // last
		c.anchor = GridBagConstraints.WEST;
		c.weightx = 1.0;

		textControlsPane.setBorder(BorderFactory.createCompoundBorder(
				BorderFactory.createTitledBorder("Tiedot"), BorderFactory
				.createEmptyBorder(5, 5, 5, 5)));
		return textControlsPane;

	}
 
開發者ID:skarna1,項目名稱:javaportfolio,代碼行數:21,代碼來源:BaseDialog.java

示例7: AverageVectorViewer

public AverageVectorViewer(AverageVector vector, IOContainer container) {
	setLayout(new GridLayout(1, 1));
	this.vector = vector;

	JPanel mainPanel = new JPanel();
	GridBagLayout layout = new GridBagLayout();
	mainPanel.setLayout(layout);
	GridBagConstraints c = new GridBagConstraints();
	c.fill = GridBagConstraints.BOTH;
	c.insets = new Insets(11, 11, 11, 11);
	c.gridwidth = GridBagConstraints.REMAINDER;
	c.weightx = 1.0d;
	c.weighty = 0.0d;

	JLabel mainLabel = new JLabel("<html><h2>" + getName() + " (" + vector.size() + ")</h2></html>");
	layout.setConstraints(mainLabel, c);
	mainPanel.add(mainLabel);

	for (int i = 0; i < vector.size(); i++) {
		Averagable avg = vector.getAveragable(i);
		Component visualizationComponent = ResultDisplayTools.createVisualizationComponent(avg, container, "Averagable");
		layout.setConstraints(visualizationComponent, c);
		mainPanel.add(visualizationComponent);

	}
	ExtendedJScrollPane scrollPane = new ExtendedJScrollPane(mainPanel);
	scrollPane.setBorder(null);
	add(scrollPane);
}
 
開發者ID:transwarpio,項目名稱:rapidminer,代碼行數:29,代碼來源:AverageVectorViewer.java

示例8: initComponents

/** Inits the subcomponents. Sets layout for this top component and adds {@code BundleEditPanel} to it. 
 * @see BundleEditPanel */
private void initComponents() {
    GridBagLayout gridbag = new GridBagLayout();
    setLayout(gridbag);

    GridBagConstraints c = new GridBagConstraints();
    c.fill = GridBagConstraints.BOTH;
    c.weightx = 1.0;
    c.weighty = 1.0;
    c.gridwidth = GridBagConstraints.REMAINDER;
    JPanel panel = new BundleEditPanel(bundleStructure, new PropertiesTableModel(bundleStructure));
    gridbag.setConstraints(panel, c);
    add(panel);
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:15,代碼來源:PropertiesOpen.java

示例9: MediaPanel

public MediaPanel() {
    super();

    GridBagLayout gridbag = new GridBagLayout();
    GridBagConstraints c = new GridBagConstraints();

    setLayout(gridbag);
    setBorder(BorderFactory.createTitledBorder(strTitle));

    cbSize = new JComboBox();
    cbSource = new JComboBox();

    c.fill = GridBagConstraints.BOTH;
    c.insets = compInsets;
    c.weighty = 1.0;

    c.weightx = 0.0;
    lblSize = new JLabel(getMsg("label.size"), JLabel.TRAILING);
    lblSize.setDisplayedMnemonic(getMnemonic("label.size"));
    lblSize.setLabelFor(cbSize);
    addToGB(lblSize, this, gridbag, c);
    c.weightx = 1.0;
    c.gridwidth = GridBagConstraints.REMAINDER;
    addToGB(cbSize, this, gridbag, c);

    c.weightx = 0.0;
    c.gridwidth = 1;
    lblSource = new JLabel(getMsg("label.source"), JLabel.TRAILING);
    lblSource.setDisplayedMnemonic(getMnemonic("label.source"));
    lblSource.setLabelFor(cbSource);
    addToGB(lblSource, this, gridbag, c);
    c.gridwidth = GridBagConstraints.REMAINDER;
    addToGB(cbSource, this, gridbag, c);
}
 
開發者ID:lambdalab-mirror,項目名稱:jdk8u-jdk,代碼行數:34,代碼來源:ServiceDialog.java

示例10: setGridHeight

final public ExtendedGridBagConstraints setGridHeight(int intPgridHeight) {
	if (intPgridHeight > 0 || intPgridHeight == GridBagConstraints.REMAINDER || intPgridHeight == GridBagConstraints.RELATIVE) {
		this.gridheight = intPgridHeight;
	} else {
		Tools.err("Bad vertical width value : ", intPgridHeight);
	}
	return this;
}
 
開發者ID:jugglemaster,項目名稱:JuggleMasterPro,代碼行數:8,代碼來源:ExtendedGridBagConstraints.java

示例11: ObjectInfoPanel

public ObjectInfoPanel() {
	setBorder(BorderFactory.createLineBorder(Color.BLACK, 3));
	constraints = new GridBagConstraints();
	//constraints.insets = new Insets(10, 10, 10, 10);
	setLayout(new GridBagLayout());
	
	JLabel name = new JLabel("Information on the selected object");
	constraints.insets = new Insets(5, 5, 5, 5);
	constraints.gridx = 0;
	constraints.gridy = 0;
	constraints.gridwidth = GridBagConstraints.REMAINDER;
	add(name, constraints);

	objectName = new JLabel("Object type/name");
	constraints.gridx = 0;
	constraints.gridy = 1;
	constraints.gridwidth = GridBagConstraints.REMAINDER;
	add(objectName, constraints);
	
	innerPanel = new InnerObjectPanel();
	constraints.gridx = 0;
	constraints.gridy = 2;
	constraints.gridwidth = GridBagConstraints.REMAINDER;
	add(innerPanel, constraints);
	
	resourcesPanel = new ResourcesPanel();
	constraints.gridx = 0;
	constraints.gridy = 3; 
	constraints.gridwidth = GridBagConstraints.REMAINDER;
	add(resourcesPanel, constraints);
	
	selectedObject = null;
}
 
開發者ID:CatherineHa,項目名稱:Proj4,代碼行數:33,代碼來源:ObjectInfoPanel.java

示例12: AbstractConfigurationWizard

/** Creates a new wizard. */
public AbstractConfigurationWizard(String name, ConfigurationListener listener) {
	super(RapidMinerGUI.getMainFrame(), name, true);

	this.listener = listener;

	// button panel
	JPanel buttonPanel = new JPanel(new FlowLayout(FlowLayout.RIGHT));
	buttonPanel.add(previous);
	buttonPanel.add(next);

	buttonPanel.add(Box.createHorizontalStrut(11));
	JButton cancel = new JButton(new ResourceAction("cancel") {

		private static final long serialVersionUID = 1L;

		@Override
		public void actionPerformed(ActionEvent e) {
			cancel();
		}
	});
	buttonPanel.add(cancel);

	getContentPane().add(buttonPanel, BorderLayout.SOUTH);

	// main panel
	c.fill = GridBagConstraints.BOTH;
	c.anchor = GridBagConstraints.NORTHWEST;
	c.weightx = 1;
	c.weighty = 1;
	c.gridwidth = GridBagConstraints.REMAINDER;
	c.insets = new Insets(11, 11, 11, 11);
	this.contentPanel = new JPanel(layout);
	layout.setConstraints(mainPanel, c);
	contentPanel.add(mainPanel);

	getContentPane().add(contentPanel, BorderLayout.CENTER);

	setSize(Math.max(640, (int) (0.66d * getOwner().getWidth())), Math.max(480, (int) (0.66d * getOwner().getHeight())));

	setLocationRelativeTo(getOwner());
}
 
開發者ID:transwarpio,項目名稱:rapidminer,代碼行數:42,代碼來源:AbstractConfigurationWizard.java

示例13: TeamInfoPanel

public TeamInfoPanel(Team team) {
	this.team = team;
	
	setBorder(BorderFactory.createLineBorder(team.getTeamColor(), 3));
	constraints = new GridBagConstraints();
	//constraints.insets = new Insets(10, 10, 10, 10);
	setLayout(new GridBagLayout());
	
	JLabel name = new JLabel(team.getLadderName());
	constraints.insets = new Insets(1, 1, 1, 1);
	constraints.gridx = 0;
	constraints.gridy = 0;
	constraints.gridwidth = GridBagConstraints.REMAINDER;
	add(name, constraints);

	JLabel scoreText = new JLabel("Score");
	constraints.gridx = 0;
	constraints.gridy = 1;
	constraints.gridwidth = GridBagConstraints.RELATIVE;
	add(scoreText, constraints);

	score = new JLabel("0");
	constraints.gridx = 1;
	constraints.gridy = 1;
	constraints.gridwidth = GridBagConstraints.REMAINDER;
	add(score, constraints);

	JLabel FlagText = new JLabel("Flags");
	constraints.gridx = 0;
	constraints.gridy = 2;
	constraints.gridwidth = GridBagConstraints.RELATIVE;
	add(FlagText, constraints);

	flags = new JLabel("0");
	constraints.gridx = 1;
	constraints.gridy = 2;
	constraints.gridwidth = GridBagConstraints.REMAINDER;
	add(flags, constraints);
	
	
	resourcesPanel = new ResourcesPanel();
	constraints.gridx = 0;
	constraints.gridy = 3;
	add(resourcesPanel, constraints);

	damagePanel = new DamagePanel();
	constraints.gridx = 0;
	constraints.gridy = 4;
	add(damagePanel, constraints);

}
 
開發者ID:CatherineHa,項目名稱:Proj4,代碼行數:51,代碼來源:TeamInfoPanel.java

示例14: JobAttributesPanel

public JobAttributesPanel() {
    super();

    GridBagLayout gridbag = new GridBagLayout();
    GridBagConstraints c = new GridBagConstraints();

    setLayout(gridbag);
    setBorder(BorderFactory.createTitledBorder(strTitle));

    c.fill = GridBagConstraints.NONE;
    c.insets = compInsets;
    c.weighty = 1.0;

    cbJobSheets = createCheckBox("checkbox.jobsheets", this);
    c.anchor = GridBagConstraints.LINE_START;
    addToGB(cbJobSheets, this, gridbag, c);

    JPanel pnlTop = new JPanel();
    lblPriority = new JLabel(getMsg("label.priority"), JLabel.TRAILING);
    lblPriority.setDisplayedMnemonic(getMnemonic("label.priority"));

    pnlTop.add(lblPriority);
    snModel = new SpinnerNumberModel(1, 1, 100, 1);
    spinPriority = new JSpinner(snModel);
    lblPriority.setLabelFor(spinPriority);
    // REMIND
    ((JSpinner.NumberEditor)spinPriority.getEditor()).getTextField().setColumns(3);
    spinPriority.addChangeListener(this);
    pnlTop.add(spinPriority);
    c.anchor = GridBagConstraints.LINE_END;
    c.gridwidth = GridBagConstraints.REMAINDER;
    pnlTop.getAccessibleContext().setAccessibleName(
                               getMsg("label.priority"));
    addToGB(pnlTop, this, gridbag, c);

    c.fill = GridBagConstraints.HORIZONTAL;
    c.anchor = GridBagConstraints.CENTER;
    c.weightx = 0.0;
    c.gridwidth = 1;
    char jmnemonic = getMnemonic("label.jobname");
    lblJobName = new JLabel(getMsg("label.jobname"), JLabel.TRAILING);
    lblJobName.setDisplayedMnemonic(jmnemonic);
    addToGB(lblJobName, this, gridbag, c);
    c.weightx = 1.0;
    c.gridwidth = GridBagConstraints.REMAINDER;
    tfJobName = new JTextField();
    lblJobName.setLabelFor(tfJobName);
    tfJobName.addFocusListener(this);
    tfJobName.setFocusAccelerator(jmnemonic);
    tfJobName.getAccessibleContext().setAccessibleName(
                                     getMsg("label.jobname"));
    addToGB(tfJobName, this, gridbag, c);

    c.weightx = 0.0;
    c.gridwidth = 1;
    char umnemonic = getMnemonic("label.username");
    lblUserName = new JLabel(getMsg("label.username"), JLabel.TRAILING);
    lblUserName.setDisplayedMnemonic(umnemonic);
    addToGB(lblUserName, this, gridbag, c);
    c.gridwidth = GridBagConstraints.REMAINDER;
    tfUserName = new JTextField();
    lblUserName.setLabelFor(tfUserName);
    tfUserName.addFocusListener(this);
    tfUserName.setFocusAccelerator(umnemonic);
    tfUserName.getAccessibleContext().setAccessibleName(
                                     getMsg("label.username"));
    addToGB(tfUserName, this, gridbag, c);
}
 
開發者ID:AdoptOpenJDK,項目名稱:openjdk-jdk10,代碼行數:68,代碼來源:ServiceDialog.java

示例15: AssociationRuleTableViewer

public AssociationRuleTableViewer(AssociationRules rules) {
	if (rules != null && rules.getNumberOfRules() > 0) {
		this.model = new AssociationRuleTableModel(rules);
		setLayout(new BorderLayout());
		JSplitPane splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT);
		splitPane.setBorder(null);

		// conclusion list
		AssociationRuleFilter filter = new AssociationRuleFilter(rules);
		filter.addAssociationRuleFilterListener(this);
		filter.setBorder(BorderFactory.createEmptyBorder(10, 10, 0, 5));
		splitPane.add(filter, 0);

		// main panel
		{
			JPanel mainPanel = new JPanel();
			mainPanel.setOpaque(true);
			mainPanel.setBackground(Colors.WHITE);
			GridBagLayout layout = new GridBagLayout();
			mainPanel.setLayout(layout);
			GridBagConstraints c = new GridBagConstraints();
			c.fill = GridBagConstraints.BOTH;
			c.weightx = 1;
			c.weighty = 1;
			c.gridwidth = GridBagConstraints.REMAINDER;
			c.insets = new Insets(15, 10, 10, 10);

			table.setModel(model);
			table.setRowHeight(PropertyPanel.VALUE_CELL_EDITOR_HEIGHT);
			table.setRowHighlighting(true);
			JScrollPane tablePane = new ExtendedJScrollPane(table);
			tablePane.setBorder(null);
			tablePane.setBackground(Colors.WHITE);
			tablePane.getViewport().setBackground(Colors.WHITE);
			layout.setConstraints(tablePane, c);
			mainPanel.add(tablePane);

			setColumnSizes();

			splitPane.add(mainPanel, 1);
		}
		filter.triggerFilter();

		add(splitPane, BorderLayout.CENTER);
	} else {
		add(ResultDisplayTools.createErrorComponent("No rules found"), BorderLayout.CENTER);
	}
}
 
開發者ID:transwarpio,項目名稱:rapidminer,代碼行數:48,代碼來源:AssociationRuleTableViewer.java


注:本文中的java.awt.GridBagConstraints.REMAINDER屬性示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。