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


Java SequentialGroup类代码示例

本文整理汇总了Java中javax.swing.GroupLayout.SequentialGroup的典型用法代码示例。如果您正苦于以下问题:Java SequentialGroup类的具体用法?Java SequentialGroup怎么用?Java SequentialGroup使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: updatePanels

import javax.swing.GroupLayout.SequentialGroup; //导入依赖的package包/类
private void updatePanels() {
	jFiltersPanel.removeAll();
	GroupLayout groupLayout = new GroupLayout(jFiltersPanel);
	jFiltersPanel.setLayout(groupLayout);
	groupLayout.setAutoCreateGaps(true);
	groupLayout.setAutoCreateContainerGaps(false);
	ParallelGroup horizontalGroup = groupLayout.createParallelGroup();
	SequentialGroup verticalGroup = groupLayout.createSequentialGroup();
	for (LocationPanel locationPanel : locationPanels) {
		horizontalGroup.addComponent(locationPanel.getPanel());
		verticalGroup.addComponent(locationPanel.getPanel());
	}
	jFiltersPanel.setVisible(!locationPanels.isEmpty());
	groupLayout.setHorizontalGroup(horizontalGroup);
	groupLayout.setVerticalGroup(verticalGroup);
	autoValidate();
	this.getDialog().pack();
}
 
开发者ID:GoldenGnu,项目名称:jeveassets,代码行数:19,代码来源:StockpileDialog.java

示例2: add

import javax.swing.GroupLayout.SequentialGroup; //导入依赖的package包/类
private void add(GroupLayout layout, ParallelGroup horizontalGroup, SequentialGroup verticalGroup) {
	//Layout
	horizontalGroup
		.addGroup(layout.createSequentialGroup()
			.addComponent(jLabel, 75, 75, 75)
			.addComponent(jBrowse)
			.addComponent(jReset)
			.addComponent(jPlay)
		);
	verticalGroup
		.addGroup(layout.createParallelGroup(GroupLayout.Alignment.CENTER)
			.addComponent(jLabel)
			.addComponent(jBrowse)
			.addComponent(jReset)
			.addComponent(jPlay)
		);
}
 
开发者ID:GoldenGnu,项目名称:jwarframe,代码行数:18,代码来源:SettingsTool.java

示例3: buildSpecV

import javax.swing.GroupLayout.SequentialGroup; //导入依赖的package包/类
private Group buildSpecV(GroupLayout layout) {
    SequentialGroup specSectionV = layout.createSequentialGroup();

    specSectionV.addGap(5, 10, 15);
    for (int i = 0; i < cboSpecialty.length; i++) {
        specSectionV.addGroup(parallelPair(layout, cboSpecialty[i],
                txtSpecialty[i]));
        if (i == cboSpecialty.length - 1) {
            specSectionV.addGap(5, 10, Short.MAX_VALUE);
        } else {
            specSectionV.addGap(5, 10, 15);
        }

    }
    return specSectionV;
}
 
开发者ID:pikimix,项目名称:ChatProgram,代码行数:17,代码来源:Changeling.java

示例4: buildMeritsV

import javax.swing.GroupLayout.SequentialGroup; //导入依赖的package包/类
private Group buildMeritsV(GroupLayout layout) {
    SequentialGroup contractsSectionV = layout.createSequentialGroup();

    contractsSectionV.addGap(5, 10, 15);
    for (int i = 0; i < cboMerits.length; i++) {
        contractsSectionV.addGroup(parallelPair(layout, cboMerits[i],
                parallelRadioArray(layout, rdoMerits[i])));
        if (i == rdoContracts.length - 1) {
            contractsSectionV.addGap(5, 10, Short.MAX_VALUE);
        } else {
            contractsSectionV.addGap(5, 10, 15);
        }

    }
    return contractsSectionV;
}
 
开发者ID:pikimix,项目名称:ChatProgram,代码行数:17,代码来源:Changeling.java

示例5: buildGoblinContractsV

import javax.swing.GroupLayout.SequentialGroup; //导入依赖的package包/类
private Group buildGoblinContractsV(GroupLayout layout) {
    SequentialGroup contractsSectionV = layout.createSequentialGroup();

    contractsSectionV.addGap(5, 10, 15);
    for (int i = 0; i < cboContracts.length; i++) {
        contractsSectionV.addGroup(parallelPair(layout, lblGoblin[i],
                txtGoblin[i]));
        if (i == rdoContracts.length - 1) {
            contractsSectionV.addGap(5, 10, Short.MAX_VALUE);
        } else {
            contractsSectionV.addGap(5, 10, 15);
        }

    }
    return contractsSectionV;
}
 
开发者ID:pikimix,项目名称:ChatProgram,代码行数:17,代码来源:Changeling.java

示例6: buildContractsV

import javax.swing.GroupLayout.SequentialGroup; //导入依赖的package包/类
private Group buildContractsV(GroupLayout layout) {
    SequentialGroup contractsSectionV = layout.createSequentialGroup();

    contractsSectionV.addGap(5, 10, 15);
    for (int i = 0; i < cboContracts.length; i++) {
        contractsSectionV.addGroup(parallelPair(layout, cboContracts[i],
                parallelRadioArray(layout, rdoContracts[i])));
        if (i == rdoContracts.length - 1) {
            contractsSectionV.addGap(5, 10, Short.MAX_VALUE);
        } else {
            contractsSectionV.addGap(5, 10, 15);
        }

    }
    return contractsSectionV;
}
 
开发者ID:pikimix,项目名称:ChatProgram,代码行数:17,代码来源:Changeling.java

示例7: generateJFreeChart

import javax.swing.GroupLayout.SequentialGroup; //导入依赖的package包/类
/**
 * Generate a vertical list of JFreeCharts
 * 
 * @param labels
 *            - the labels for the values
 * @param index
 *            - the index
 * @param values
 * @return
 */
public static String generateJFreeChart(List<String> labels,
        List<Double> index, List<List<Double>> values) {
    JPanel panel = new JPanel();
    // create a layout
    GroupLayout layout = new GroupLayout(panel);
    panel.setLayout(layout);
    layout.setAutoCreateGaps(true);
    layout.setAutoCreateContainerGaps(true);
    SequentialGroup sgv = layout.createSequentialGroup();
    layout.setVerticalGroup(sgv);
    ParallelGroup pgh = layout.createParallelGroup();
    layout.setHorizontalGroup(pgh);
    for (int i = 0; i != labels.size(); i++) {
        XYSeries xys = new XYSeries(labels.get(i));
        for (int j = 0; j != index.size(); j++) {
            xys.add(index.get(j), values.get(i).get(j));
        }
        XYSeriesCollection xysc = new XYSeriesCollection(xys);
        JFreeChart chart =
                ChartFactory.createXYLineChart(labels.get(i), "Time",
                        "Focus", xysc, PlotOrientation.VERTICAL, false,
                        false, false);
        chart.setBackgroundPaint(Color.white);
        chart.getTitle().setFont(new Font("Tahoma", Font.BOLD, 14));
        ChartPanel cp = new ChartPanel(chart);
        sgv.addComponent(cp);
        pgh.addComponent(cp);
    }
    JFrame frame = new JFrame();
    frame.add(panel);
    frame.pack();
    frame.setVisible(true);
    return null;
}
 
开发者ID:Xapagy,项目名称:Xapagy,代码行数:45,代码来源:tdVisualizationGenerator.java

示例8: makeVerticalGroup

import javax.swing.GroupLayout.SequentialGroup; //导入依赖的package包/类
private SequentialGroup makeVerticalGroup( GroupLayout layout ) {
	SequentialGroup verticalGroup = layout.createSequentialGroup();

	verticalGroup.addGroup( layout.createParallelGroup( GroupLayout.Alignment.BASELINE )
			.addComponent( subjectJLabel )
			.addComponent( relationJLabel )
			.addComponent( objectJLabel )
	);

	for ( int i = 0; i < Constants.MAX_EXPORTS; i++ ) {
		verticalGroup.addGroup( layout.createParallelGroup( GroupLayout.Alignment.BASELINE )
				.addComponent( removeRowButtons.get( i ) )
				.addComponent( subjectComboBoxes.get( i ) )
				.addComponent( relationComboBoxes.get( i ) )
				.addComponent( objectComboBoxes.get( i ) )
		);
	}

	verticalGroup.addComponent( maxExportLimitLabel );
	verticalGroup.addGroup( layout.createParallelGroup( GroupLayout.Alignment.BASELINE )
			.addComponent( addRelationshipButton )
			.addComponent( togrid )
			.addComponent( exportButton )
	);

	return verticalGroup;
}
 
开发者ID:Ostrich-Emulators,项目名称:semtool,代码行数:28,代码来源:ExportSpecificRelationshipsToLoadingSheetAction.java

示例9: doLayout

import javax.swing.GroupLayout.SequentialGroup; //导入依赖的package包/类
private void doLayout() {
	autoValidate();
	jFilters.removeAll();
	
	GroupLayout layout = new GroupLayout(jFilters);
	jFilters.setLayout(layout);
	layout.setAutoCreateGaps(true);
	layout.setAutoCreateContainerGaps(false);

	ParallelGroup horizontalGroup = layout.createParallelGroup();
	SequentialGroup verticalGroup = layout.createSequentialGroup();
	for (FilterPanel ownerPanel : ownerPanels) {
		horizontalGroup.addComponent(ownerPanel.getPanel());
		verticalGroup.addComponent(ownerPanel.getPanel());
	}

	for (FilterPanel flagPanel : flagPanels) {
		horizontalGroup.addComponent(flagPanel.getPanel());
		verticalGroup.addComponent(flagPanel.getPanel());
	}

	for (FilterPanel containerPanel : containerPanels) {
		horizontalGroup.addComponent(containerPanel.getPanel());
		verticalGroup.addComponent(containerPanel.getPanel());
	}

	layout.setVerticalGroup(verticalGroup);
	layout.setHorizontalGroup(horizontalGroup);
	getDialog().pack();
}
 
开发者ID:GoldenGnu,项目名称:jeveassets,代码行数:31,代码来源:StockpileDialog.java

示例10: getInputPanel

import javax.swing.GroupLayout.SequentialGroup; //导入依赖的package包/类
private JPanel getInputPanel(){
	if(panelInput == null){
		panelInput = new JPanel();
		panelInput.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
		GroupLayout layout = new GroupLayout(panelInput);
		panelInput.setLayout(layout);
		layout.setAutoCreateGaps(true);
		layout.setAutoCreateContainerGaps(true);
		
		SequentialGroup horizGroup = layout.createSequentialGroup();
		JLabel inputFileLabel = new JLabel("Input file:");
		inputFileLabel.setPreferredSize(new Dimension(100,30));
		inputFileLabel.setHorizontalAlignment(SwingConstants.TRAILING);
		JLabel inputFormatLabel = new JLabel("Input format:");
		inputFormatLabel.setPreferredSize(new Dimension(100,30));
		inputFormatLabel.setHorizontalAlignment(SwingConstants.TRAILING);
		horizGroup.addGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING).addComponent(inputFileLabel).addComponent(inputFormatLabel));
		horizGroup.addGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING).addComponent(getPNPathField()).addComponent(getFormatBox()));
		horizGroup.addGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING).addComponent(getBrowseButton()));
		layout.setHorizontalGroup(horizGroup);
		
		SequentialGroup verticalGroup = layout.createSequentialGroup();
		verticalGroup.addGroup(layout.createParallelGroup(GroupLayout.Alignment.BASELINE).addComponent(inputFileLabel).addComponent(getPNPathField()).addComponent(getBrowseButton()));
		verticalGroup.addGroup(layout.createParallelGroup(GroupLayout.Alignment.BASELINE).addComponent(inputFormatLabel).addComponent(getFormatBox()));
		layout.setVerticalGroup(verticalGroup);
	}
	return panelInput;
}
 
开发者ID:iig-uni-freiburg,项目名称:SEPIA,代码行数:29,代码来源:PNParserDialog.java

示例11: makeTweaksLayout

import javax.swing.GroupLayout.SequentialGroup; //导入依赖的package包/类
private GroupLayout makeTweaksLayout(List<JCheckBox> tweaks) {
    GroupLayout gl = new GroupLayout(miscTweaksPanel);
    int numTweaks = tweaks.size();

    // Handle columns
    SequentialGroup columnsGroup = gl.createSequentialGroup().addContainerGap();
    int numCols = Math.min(TWEAK_COLS, numTweaks);
    ParallelGroup[] colGroups = new ParallelGroup[numCols];
    for (int col = 0; col < numCols; col++) {
        if (col > 0) {
            columnsGroup.addGap(18, 18, 18);
        }
        colGroups[col] = gl.createParallelGroup(GroupLayout.Alignment.LEADING);
        columnsGroup.addGroup(colGroups[col]);
    }
    for (int tweak = 0; tweak < numTweaks; tweak++) {
        colGroups[tweak % numCols].addComponent(tweaks.get(tweak));
    }
    columnsGroup.addContainerGap();
    gl.setHorizontalGroup(gl.createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(columnsGroup));

    // And rows
    SequentialGroup rowsGroup = gl.createSequentialGroup().addContainerGap();
    int numRows = (numTweaks - 1) / numCols + 1;
    ParallelGroup[] rowGroups = new ParallelGroup[numRows];
    for (int row = 0; row < numRows; row++) {
        if (row > 0) {
            rowsGroup.addPreferredGap(ComponentPlacement.UNRELATED);
        }
        rowGroups[row] = gl.createParallelGroup(GroupLayout.Alignment.BASELINE);
        rowsGroup.addGroup(rowGroups[row]);
    }
    for (int tweak = 0; tweak < numTweaks; tweak++) {
        rowGroups[tweak / numCols].addComponent(tweaks.get(tweak));
    }
    rowsGroup.addContainerGap();
    gl.setVerticalGroup(gl.createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(rowsGroup));
    return gl;
}
 
开发者ID:Dabomstew,项目名称:universal-pokemon-randomizer,代码行数:40,代码来源:RandomizerGUI.java

示例12: initComponent

import javax.swing.GroupLayout.SequentialGroup; //导入依赖的package包/类
private void initComponent() {
	this.initInputComponents();

	final GroupLayout groupLayout = new GroupLayout(this);
	groupLayout.setAutoCreateContainerGaps(true);
	groupLayout.setAutoCreateGaps(true);
	this.setLayout(groupLayout);

	SequentialGroup horizontalGroup = groupLayout.createSequentialGroup();
	ParallelGroup first = groupLayout.createParallelGroup(getLabelsAlignment());
	ParallelGroup second = groupLayout.createParallelGroup();
	ParallelGroup third = groupLayout.createParallelGroup();
	parameters.forEach(c -> {
		first.addComponent(descriptionLabels.get(c));
		second.addComponent(inputComponents.get(c));
		third.addComponent(helpLabels.get(c));
	});
	horizontalGroup
		.addGroup(first)
		.addGroup(second)
		.addGroup(third);
	groupLayout.setHorizontalGroup(horizontalGroup);

	SequentialGroup verticalGroup = groupLayout.createSequentialGroup();
	parameters.forEach(c -> {
		ParallelGroup current = groupLayout.createParallelGroup(Alignment.CENTER);
		current.addComponent(descriptionLabels.get(c));
		current.addComponent(inputComponents.get(c));
		current.addComponent(helpLabels.get(c));
		verticalGroup.addGroup(current);
	});
	groupLayout.setVerticalGroup(verticalGroup);
}
 
开发者ID:sing-group,项目名称:GC4S,代码行数:34,代码来源:InputParametersPanel.java

示例13: createLayout

import javax.swing.GroupLayout.SequentialGroup; //导入依赖的package包/类
private void createLayout() {
	this.setLayout(layout = new GroupLayout(this));

	setFloatable(false);
	
	SequentialGroup hGroup = layout.createSequentialGroup();
	ParallelGroup pGroup = layout.createParallelGroup(GroupLayout.Alignment.BASELINE);
	
	boolean isSubst = LookAndFeelManager.isSubstance();
	
	for(int i = 0; i < BUTTONCOUNT; i++) {
		if (isSubst) {
			hGroup.addComponent(buttons[i], sizes[i], buttons[i].getPreferredSize().width, Short.MAX_VALUE);
			pGroup.addComponent(buttons[i], 0, buttons[i].getPreferredSize().height, Short.MAX_VALUE);
		} else {
			hGroup.addComponent(buttons[i]);
			pGroup.addComponent(buttons[i]);
		}
		
		hGroup.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED, 0, Short.MAX_VALUE);
		final int fi = i;
		buttons[i].addActionListener(new ActionListener() {
			@Override
			public void actionPerformed(ActionEvent arg0) {
				onClick(fi);
			}
		});
	}
	
	if (isSubst) {
		hGroup.addGap(4);
	}
	
	layout.setHorizontalGroup(hGroup);
	
	layout.setVerticalGroup(pGroup);
}
 
开发者ID:Mikescher,项目名称:jClipCorn,代码行数:38,代码来源:SmallClipCharSortSelector.java

示例14: initWindow

import javax.swing.GroupLayout.SequentialGroup; //导入依赖的package包/类
/**
 * Creates non-setting related components and composes the window's layout.
 *
 * @param listener   the object listening for changes to the preferences
 * @param controller the controller in charge of restarting the application if need be
 */
private void initWindow(UIPreferencesChangeListener listener, ApplicationController controller) {
    /* Create minor components. */
    JLabel themeLabel = new JLabel(MessageBundle.get("pref.theme"));
    themeLabel.setLabelFor(themeCB);

    JLabel localeLabel = new JLabel(MessageBundle.get("pref.lang"));
    localeLabel.setLabelFor(localeCB);

    JButton saveBtn = new JButton(MessageBundle.get("action.save"));
    saveBtn.addActionListener(new SaveButtonListener(listener, controller));
    JButton cancelBtn = new JButton(MessageBundle.get("action.cancel"));
    cancelBtn.addActionListener(new CancelButtonListener());

    /* Create the layout. */
    GroupLayout layout = new GroupLayout(this);
    setLayout(layout);

    layout.setAutoCreateGaps(true);
    layout.setAutoCreateContainerGaps(true);
    SequentialGroup comboBoxesHorizontalGroup = layout.createSequentialGroup()
            .addGroup(layout.createParallelGroup().addComponent(localeLabel).addComponent(themeLabel))
            .addGroup(layout.createParallelGroup().addComponent(localeCB).addComponent(themeCB));
    layout.setHorizontalGroup(layout.createSequentialGroup()
            .addGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(comboBoxesHorizontalGroup)
                    .addComponent(onTopCheckBox))
            .addGap(STD_GAP).addGroup(layout.createParallelGroup().addComponent(saveBtn).addComponent(cancelBtn)));

    layout.setVerticalGroup(layout.createSequentialGroup()
            .addGroup(layout.createParallelGroup(GroupLayout.Alignment.BASELINE).addComponent(localeLabel)
                    .addComponent(localeCB).addComponent(saveBtn))
            .addGroup(layout.createParallelGroup(GroupLayout.Alignment.BASELINE).addComponent(themeLabel)
                    .addComponent(themeCB).addComponent(cancelBtn))
            .addComponent(onTopCheckBox));

    layout.linkSize(saveBtn, cancelBtn);
}
 
开发者ID:cyChop,项目名称:daily-tasks,代码行数:43,代码来源:PreferencesPanel.java

示例15: buildAttributesH

import javax.swing.GroupLayout.SequentialGroup; //导入依赖的package包/类
private Group buildAttributesH(GroupLayout layout) {

        SequentialGroup statsSectionH = layout.createSequentialGroup();

        statsSectionH.addGap(10, 75, Short.MAX_VALUE);

        statsSectionH.addGroup(layout.createParallelGroup().addGroup(sequentialPair(
                layout, lblIntelligence,
                sequentialRadioArray(layout, rdoIntelligence))).addGroup(sequentialPair(
                layout, lblWits,
                sequentialRadioArray(layout, rdoWits))).addGroup(sequentialPair(
                layout, lblResolve,
                sequentialRadioArray(layout, rdoResolve))));

        statsSectionH.addGap(10, 15, 50);

        statsSectionH.addGroup(layout.createParallelGroup().addGroup(sequentialPair(
                layout, lblStrength,
                sequentialRadioArray(layout, rdoStrength))).addGroup(sequentialPair(
                layout, lblDexterity,
                sequentialRadioArray(layout, rdoDexterity))).addGroup(sequentialPair(
                layout, lblStamina,
                sequentialRadioArray(layout, rdoStamina))));

        statsSectionH.addGap(10, 15, 50);

        statsSectionH.addGroup(layout.createParallelGroup().addGroup(sequentialPair(
                layout, lblPresence,
                sequentialRadioArray(layout, rdoPresence))).addGroup(sequentialPair(
                layout, lblManipulation,
                sequentialRadioArray(layout, rdoManipulation))).addGroup(sequentialPair(
                layout, lblComposure,
                sequentialRadioArray(layout, rdoComposure))));

        statsSectionH.addGap(10, 75, Short.MAX_VALUE);

        return statsSectionH;
    }
 
开发者ID:pikimix,项目名称:ChatProgram,代码行数:39,代码来源:Changeling.java


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