本文整理汇总了Java中javax.swing.GroupLayout.SequentialGroup.addGap方法的典型用法代码示例。如果您正苦于以下问题:Java SequentialGroup.addGap方法的具体用法?Java SequentialGroup.addGap怎么用?Java SequentialGroup.addGap使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类javax.swing.GroupLayout.SequentialGroup
的用法示例。
在下文中一共展示了SequentialGroup.addGap方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: 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;
}
示例2: 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;
}
示例3: 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;
}
示例4: 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;
}
示例5: 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;
}
示例6: 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);
}
示例7: 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;
}
示例8: buildDetailsH
import javax.swing.GroupLayout.SequentialGroup; //导入方法依赖的package包/类
private Group buildDetailsH(GroupLayout layout) {
SequentialGroup skillsSectionH = layout.createSequentialGroup();
skillsSectionH.addGap(5, 15, Short.MAX_VALUE);
skillsSectionH.addGroup(
layout.createParallelGroup(GroupLayout.Alignment.CENTER)
.addGroup(
sequentialPair(layout,
sequentialPair(layout, lblBackgroud, scrBackground),
sequentialPair(layout, lblDescription, scrDescription)))
.addGap(5, 15, Short.MAX_VALUE)
.addGroup(
sequentialPair(layout,
sequentialPair(layout, lblAge, spnAge),
sequentialPair(layout, lblHeight, txtHeight)))
.addGap(5, 15, Short.MAX_VALUE)
.addGroup(
sequentialPair(layout,
sequentialPair(layout, lblApparent, spnApparent),
sequentialPair(layout, lblWeight, txtWeight)))
.addGap(5, 15, Short.MAX_VALUE)
.addGroup(
sequentialPair(layout,
sequentialPair(layout, lblHair, txtHair),
sequentialPair(layout, lblRace, txtRace)))
.addGap(5, 15, Short.MAX_VALUE)
.addGroup(
sequentialPair(layout,
sequentialPair(layout, lblEyes, txtEyes),
sequentialPair(layout, lblSex, txtSex))));
skillsSectionH.addGap(5, 15, Short.MAX_VALUE);
return skillsSectionH;
}
示例9: buildPledgesV
import javax.swing.GroupLayout.SequentialGroup; //导入方法依赖的package包/类
private Group buildPledgesV(GroupLayout layout) {
SequentialGroup contractsSectionV = layout.createSequentialGroup();
contractsSectionV.addGap(5, 10, 15);
contractsSectionV.addComponent(scrPledge);
contractsSectionV.addGap(5, 10, 15);
return contractsSectionV;
}
示例10: clear
import javax.swing.GroupLayout.SequentialGroup; //导入方法依赖的package包/类
public final void clear(){
this.removeAll();
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
this.setLayout(layout);
ParallelGroup horizontal = layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING);
horizontal.addGap(0);
SequentialGroup vertical = layout.createSequentialGroup();
vertical.addGap(0);
layout.setHorizontalGroup(horizontal);
layout.setVerticalGroup(vertical);
this.validate();
this.enabled = false;
}