本文整理汇总了Java中javax.swing.GroupLayout.ParallelGroup类的典型用法代码示例。如果您正苦于以下问题:Java ParallelGroup类的具体用法?Java ParallelGroup怎么用?Java ParallelGroup使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ParallelGroup类属于javax.swing.GroupLayout包,在下文中一共展示了ParallelGroup类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: updatePanels
import javax.swing.GroupLayout.ParallelGroup; //导入依赖的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();
}
示例2: add
import javax.swing.GroupLayout.ParallelGroup; //导入依赖的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)
);
}
示例3: generateJFreeChart
import javax.swing.GroupLayout.ParallelGroup; //导入依赖的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;
}
示例4: makeHorizontalGroup
import javax.swing.GroupLayout.ParallelGroup; //导入依赖的package包/类
private ParallelGroup makeHorizontalGroup( GroupLayout layout ) {
ParallelGroup removeButtonGroup = layout.createParallelGroup( GroupLayout.Alignment.LEADING );
for ( JButton removeRowButton : removeRowButtons ) {
removeButtonGroup.addComponent( removeRowButton );
}
removeButtonGroup.addComponent( addRelationshipButton );
ParallelGroup subjectCBGroup = layout.createParallelGroup( GroupLayout.Alignment.LEADING );
subjectCBGroup.addComponent( subjectJLabel );
for ( UriComboBox subjectCB : subjectComboBoxes ) {
subjectCBGroup.addComponent( subjectCB );
}
subjectCBGroup.addComponent( maxExportLimitLabel );
ParallelGroup relationCBGroup = layout.createParallelGroup( GroupLayout.Alignment.LEADING );
relationCBGroup.addComponent( relationJLabel );
for ( UriComboBox relationCB : relationComboBoxes ) {
relationCBGroup.addComponent( relationCB );
}
ParallelGroup objectCBGroup = layout.createParallelGroup( GroupLayout.Alignment.LEADING );
objectCBGroup.addComponent( objectJLabel );
for ( UriComboBox objectCB : objectComboBoxes ) {
objectCBGroup.addComponent( objectCB );
}
ParallelGroup horizontalGroup = layout.createParallelGroup( GroupLayout.Alignment.TRAILING )
.addGroup( layout.createSequentialGroup()
.addGroup( removeButtonGroup )
.addGroup( subjectCBGroup )
.addGroup( relationCBGroup )
.addGroup( objectCBGroup )
)
.addGroup( layout.createSequentialGroup()
.addComponent( togrid )
.addComponent( exportButton ) );
return horizontalGroup;
}
开发者ID:Ostrich-Emulators,项目名称:semtool,代码行数:40,代码来源:ExportSpecificRelationshipsToLoadingSheetAction.java
示例5: doLayout
import javax.swing.GroupLayout.ParallelGroup; //导入依赖的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();
}
示例6: makeTweaksLayout
import javax.swing.GroupLayout.ParallelGroup; //导入依赖的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;
}
示例7: initComponent
import javax.swing.GroupLayout.ParallelGroup; //导入依赖的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);
}
示例8: createLayout
import javax.swing.GroupLayout.ParallelGroup; //导入依赖的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);
}
示例9: buildAttributesV
import javax.swing.GroupLayout.ParallelGroup; //导入依赖的package包/类
private Group buildAttributesV(GroupLayout layout) {
ParallelGroup statsSectionV = layout.createParallelGroup();
statsSectionV.addGroup(layout.createSequentialGroup().addGroup(parallelPair(
layout, lblIntelligence,
parallelRadioArray(layout, rdoIntelligence))).addGroup(parallelPair(
layout, lblWits,
parallelRadioArray(layout, rdoWits))).addGroup(parallelPair(
layout, lblResolve,
parallelRadioArray(layout, rdoResolve))));
statsSectionV.addGroup(layout.createSequentialGroup().addGroup(parallelPair(
layout, lblStrength,
parallelRadioArray(layout, rdoStrength))).addGroup(parallelPair(
layout, lblDexterity,
parallelRadioArray(layout, rdoDexterity))).addGroup(parallelPair(
layout, lblStamina,
parallelRadioArray(layout, rdoStamina))));
statsSectionV.addGroup(layout.createSequentialGroup().addGroup(parallelPair(
layout, lblPresence,
parallelRadioArray(layout, rdoPresence))).addGroup(parallelPair(
layout, lblManipulation,
parallelRadioArray(layout, rdoManipulation))).addGroup(parallelPair(
layout, lblComposure,
parallelRadioArray(layout, rdoComposure))));
return statsSectionV;
}
示例10: buildDetailsV
import javax.swing.GroupLayout.ParallelGroup; //导入依赖的package包/类
private Group buildDetailsV(GroupLayout layout) {
ParallelGroup skillsSectionV = layout.createParallelGroup();
skillsSectionV.addGroup(
layout.createSequentialGroup()
.addGap(5, 10, 15)
.addGroup(
parallelPair(layout,
parallelPair(layout, lblBackgroud, scrBackground),
(parallelPair(layout, lblDescription, scrDescription))))
.addGap(5, 10, 15)
.addGroup(layout.createParallelGroup()
.addComponent(lblAge)
.addComponent(spnAge)
.addComponent(lblHeight)
.addComponent(txtHeight))
.addGap(5, 10, 15)
.addGroup(layout.createParallelGroup()
.addComponent(lblApparent)
.addComponent(spnApparent)
.addComponent(lblWeight)
.addComponent(txtWeight))
.addGap(5, 10, 15)
.addGroup(layout.createParallelGroup()
.addComponent(lblHair)
.addComponent(txtHair)
.addComponent(lblRace)
.addComponent(txtRace))
.addGap(5, 10, 15)
.addGroup(layout.createParallelGroup()
.addComponent(lblEyes)
.addComponent(txtEyes)
.addComponent(lblSex)
.addComponent(txtSex))
.addGap(5, 10, Short.MAX_VALUE));
return skillsSectionV;
}
示例11: buildSpecH
import javax.swing.GroupLayout.ParallelGroup; //导入依赖的package包/类
private Group buildSpecH(GroupLayout layout) {
ParallelGroup specSectionH = layout.createParallelGroup(
Alignment.CENTER);
for (int i = 0; i < cboSpecialty.length; i++) {
specSectionH.addGroup(sequentialPair(layout, cboSpecialty[i],
txtSpecialty[i]));
}
return specSectionH;
}
示例12: buildMeritsH
import javax.swing.GroupLayout.ParallelGroup; //导入依赖的package包/类
private Group buildMeritsH(GroupLayout layout) {
ParallelGroup contractsSectionH = layout.createParallelGroup(
Alignment.CENTER);
for (int i = 0; i < cboMerits.length; i++) {
contractsSectionH.addGroup(sequentialPair(layout, cboMerits[i],
sequentialRadioArray(layout, rdoMerits[i])));
}
return contractsSectionH;
}
示例13: buildGoblinContractsH
import javax.swing.GroupLayout.ParallelGroup; //导入依赖的package包/类
private Group buildGoblinContractsH(GroupLayout layout) {
ParallelGroup contractsSectionH = layout.createParallelGroup(
Alignment.CENTER);
for (int i = 0; i < cboContracts.length; i++) {
contractsSectionH.addGroup(sequentialPair(layout, lblGoblin[i],
txtGoblin[i]));
}
return contractsSectionH;
}
示例14: buildPledgesH
import javax.swing.GroupLayout.ParallelGroup; //导入依赖的package包/类
private Group buildPledgesH(GroupLayout layout) {
ParallelGroup contractsSectionH = layout.createParallelGroup(
Alignment.CENTER);
contractsSectionH.addComponent(scrPledge);
return contractsSectionH;
}
示例15: buildContractsH
import javax.swing.GroupLayout.ParallelGroup; //导入依赖的package包/类
private Group buildContractsH(GroupLayout layout) {
ParallelGroup contractsSectionH = layout.createParallelGroup(
Alignment.CENTER);
for (int i = 0; i < cboContracts.length; i++) {
contractsSectionH.addGroup(sequentialPair(layout, cboContracts[i],
sequentialRadioArray(layout, rdoContracts[i])));
}
return contractsSectionH;
}