本文整理汇总了Java中info.clearthought.layout.TableLayout.setHGap方法的典型用法代码示例。如果您正苦于以下问题:Java TableLayout.setHGap方法的具体用法?Java TableLayout.setHGap怎么用?Java TableLayout.setHGap使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类info.clearthought.layout.TableLayout
的用法示例。
在下文中一共展示了TableLayout.setHGap方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setupLayout
import info.clearthought.layout.TableLayout; //导入方法依赖的package包/类
private void setupLayout() {
TableLayout layout = new TableLayout(
new double[] {
TableLayout.MINIMUM, TableLayout.PREFERRED,
TableLayout.MINIMUM, TableLayout.PREFERRED,
TableLayout.MINIMUM, TableLayout.PREFERRED,
TableLayout.PREFERRED
},
new double[] { TableLayout.PREFERRED }
);
layout.setHGap( 8 );
this.setLayout( layout );
this.add( labelAuthor, new TableLayoutConstraints( 0, 0 ) );
this.add( author, new TableLayoutConstraints( 1, 0 ) );
this.add( labelAssignee, new TableLayoutConstraints( 2, 0 ) );
this.add( assignee, new TableLayoutConstraints( 3, 0 ) );
this.add( new JLabel( "Filter" ), new TableLayoutConstraints( 4, 0 ) );
this.add( textFilter, new TableLayoutConstraints( 5, 0 ) );
this.add( checkClosed, new TableLayoutConstraints( 6, 0 ) );
}
示例2: createSourceTypePanel
import info.clearthought.layout.TableLayout; //导入方法依赖的package包/类
private Component createSourceTypePanel() {
double[][] size = {
{5, TableLayout.MINIMUM, TableLayout.FILL,
TableLayout.MINIMUM, TableLayout.FILL, 5},
{5, TableLayout.FILL, 5}};
TableLayout layout = new TableLayout(size);
layout.setHGap(5);
layout.setVGap(5);
JPanel panel = new JPanel(layout);
panel.add(new JLabel(ChartResourceManager.getString("SourceType")),
"1,1");
panel.add(sourceType, "2,1");
panel.add(new JLabel(ChartResourceManager
.getString("SourceType.tableAttribute")), "3,1");
panel.add(tableAttribute, "4,1");
return panel;
}
示例3: TrackListPanel
import info.clearthought.layout.TableLayout; //导入方法依赖的package包/类
public TrackListPanel()
{
super(new TableLayout(new double[] { 0, FILL, PREFERRED, PREFERRED, 0 }, new double[] { 0, 0 }));
Arrays.sort(sortedInstruments, new Comparator<LotroInstrument>()
{
@Override public int compare(LotroInstrument a, LotroInstrument b)
{
return a.toString().compareTo(b.toString());
}
});
layout = (TableLayout) getLayout();
layout.setVGap(4);
layout.setHGap(4);
setBackground(Color.WHITE);
}
示例4: initUI
import info.clearthought.layout.TableLayout; //导入方法依赖的package包/类
private void initUI() {
// create the layout
double[] columns = {
TableLayoutConstants.PREFERRED,
TableLayoutConstants.FILL,
};
double[] rows = {
TableLayoutConstants.PREFERRED,
TableLayoutConstants.PREFERRED
};
TableLayout layout = new TableLayout(columns, rows);
layout.setHGap(6);
layout.setVGap(6);
this.setLayout(layout);
this.add(new JCheckBox("Show all schemas into object tree"), "0, 0, 1, 0");
this.add(new JLabel("Object Filter"), "0, 1");
this.add(new JTextField(25), "1, 1");
}
示例5: createJoinPanel
import info.clearthought.layout.TableLayout; //导入方法依赖的package包/类
private JPanel createJoinPanel() {
JPanel joinPanel = new JPanel();
// create the layout
double[] columns = {
TableLayoutConstants.PREFERRED,
TableLayoutConstants.PREFERRED,
TableLayoutConstants.PREFERRED
};
double[] rows = {
TableLayoutConstants.PREFERRED
};
TableLayout layout = new TableLayout(columns, rows);
layout.setVGap(6);
layout.setHGap(6);
joinPanel.setLayout(layout);
joinPanel.add(leftTextField, "0, 0");
joinPanel.add(operatorsComboBox, "1, 0");
joinPanel.add(rightTextField, "2, 0");
return joinPanel;
}
示例6: initUI
import info.clearthought.layout.TableLayout; //导入方法依赖的package包/类
private void initUI() {
double[] columns = {
TableLayoutConstants.FILL,
TableLayoutConstants.PREFERRED,
TableLayoutConstants.PREFERRED,
TableLayoutConstants.PREFERRED
};
double[] rows = {
TableLayoutConstants.PREFERRED,
};
TableLayout layout = new TableLayout(columns, rows);
layout.setHGap(6);
this.setLayout(layout);
createMaxRowsPanel();
add(createMaxRowsPanel(), "0, 0");
add(timeLabel = new JLabel("0 " + I18NSupport.getString("seconds")), "1, 0");
add(new JLine(), "2, 0");
add(rowsLabel = new JLabel("0 " + I18NSupport.getString("rows")), "3, 0");
}
示例7: createComponent
import info.clearthought.layout.TableLayout; //导入方法依赖的package包/类
@Override
public JComponent createComponent(GUIFramework framework, Element element) {
JComponent component = super.createComponent(framework, element);
final ChartSource source = getChartSource();
initAttributes(framework.getEngine());
key.setSelectedItem(source.getAttributeProperty(PIE_ATTRIBUTE_KEY));
value.setSelectedItem(source.getAttributeProperty(PIE_ATTRIBUTE_VALUE));
double[][] size = {
{5, TableLayout.MINIMUM, TableLayout.FILL,
TableLayout.MINIMUM, TableLayout.FILL, 5},
{5, TableLayout.FILL, 5}};
TableLayout layout = new TableLayout(size);
layout.setHGap(5);
layout.setVGap(5);
JPanel panel = new JPanel(layout);
panel.add(new JLabel(ChartResourceManager.getString("Chart.key")),
"1,1");
panel.add(key, "2,1");
panel.add(new JLabel(ChartResourceManager.getString("Chart.value")),
"3,1");
panel.add(value, "4,1");
JPanel panel2 = new JPanel(new BorderLayout());
panel2.add(component, BorderLayout.CENTER);
panel2.add(panel, BorderLayout.SOUTH);
return panel2;
}
示例8: createWideLabeledComponent
import info.clearthought.layout.TableLayout; //导入方法依赖的package包/类
public static JPanel createWideLabeledComponent(JComponent component, String labelText) {
double[][] sizes = {
{TableLayout.PREFERRED, TableLayout.FILL},
{TableLayout.PREFERRED},
};
TableLayout layout = new TableLayout(sizes);
layout.setHGap(SizeHelper.getLayoutHGap());
layout.setVGap(SizeHelper.getLayoutVGap());
JPanel result = new JPanel(layout);
result.add(new JLabel(labelText), "0 0");
result.add(component, "1 0");
return result;
}
示例9: SingleSequentialScencoDialog
import info.clearthought.layout.TableLayout; //导入方法依赖的package包/类
public SingleSequentialScencoDialog(Window owner, String title, EncoderSettings settings, VisualCpog model) {
super(owner, title, settings, model);
createStandardPanel();
createButtonPanel(title);
double[][] size = new double[][] {
{TableLayout.FILL},
{60, TableLayout.FILL},
};
TableLayout layout = new TableLayout(size);
layout.setHGap(SizeHelper.getLayoutHGap());
layout.setVGap(SizeHelper.getLayoutVGap());
JPanel content = new JPanel(new BorderLayout());
content.setBorder(SizeHelper.getEmptyBorder());
content.add(standardPanel);
content.add(buttonsPanel, BorderLayout.SOUTH);
setContentPane(content);
getRootPane().registerKeyboardAction(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
setVisible(false);
}
},
KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0),
JComponent.WHEN_IN_FOCUSED_WINDOW);
//sizeWindow(365, 151, 200, 100);
pack();
}
示例10: SatBasedScencoDialog
import info.clearthought.layout.TableLayout; //导入方法依赖的package包/类
public SatBasedScencoDialog(Window owner, String title, EncoderSettings settings, VisualCpog model) {
super(owner, title, settings, model);
createStandardPanel();
createGenerationPanel();
createButtonPanel();
double[][] size = new double[][] {
{TableLayout.FILL},
{60, TableLayout.FILL, 39},
};
TableLayout layout = new TableLayout(size);
layout.setHGap(3);
layout.setVGap(3);
JPanel content = new JPanel(new BorderLayout());
content.add(standardPanel, BorderLayout.NORTH);
content.add(generationPanel);
content.add(buttonsPanel, BorderLayout.SOUTH);
setContentPane(content);
getRootPane().registerKeyboardAction(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
setVisible(false);
}
}, KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0),
JComponent.WHEN_IN_FOCUSED_WINDOW);
pack();
}
示例11: PetriToCpogDialog
import info.clearthought.layout.TableLayout; //导入方法依赖的package包/类
public PetriToCpogDialog(Window owner, PetriToCpogSettings settings) {
super(owner, "Petri Net to CPOG conversion [Untanglings]", ModalityType.APPLICATION_MODAL);
modalResult = 0;
createSettingPanel();
createButtonPanel(settings);
double[][] size = new double[][] {
{TableLayout.FILL},
{110, TableLayout.FILL},
};
TableLayout layout = new TableLayout(size);
layout.setHGap(3);
layout.setVGap(3);
JPanel content = new JPanel(layout);
content.setBorder(SizeHelper.getEmptyBorder());
content.add(settingPanel, "0 0");
content.add(buttonPanel, "0 1");
setContentPane(content);
getRootPane().registerKeyboardAction(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
setVisible(false);
}
},
KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0),
JComponent.WHEN_IN_FOCUSED_WINDOW);
sizeWindow(560, 200, 200, 100);
}
示例12: setupLayout
import info.clearthought.layout.TableLayout; //导入方法依赖的package包/类
private void setupLayout() {
JScrollPane dp = new JScrollPane( textDescription, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_NEVER );
TableLayout layoutFields = new TableLayout(
new double[]{TableLayout.MINIMUM, TableLayout.FILL},
new double[]{TableLayout.MINIMUM, TableLayout.FILL}
);
layoutFields.setHGap( 5 );
layoutFields.setVGap( 5 );
JPanel fieldsPanel = new JPanel( layoutFields );
fieldsPanel.add( labelTitle, new TableLayoutConstraints( 0, 0, 0, 0 ) );
fieldsPanel.add( textTitle, new TableLayoutConstraints( 1, 0, 1, 0 ) );
fieldsPanel.add( labelDescription, new TableLayoutConstraints( 0, 1, 0, 1, TableLayout.LEFT, TableLayout.TOP ) );
fieldsPanel.add( dp, new TableLayoutConstraints( 1, 1, 1, 1 ) );
TableLayout layoutButtons = new TableLayout(
new double[]{TableLayout.MINIMUM, TableLayout.MINIMUM},
new double[]{TableLayout.MINIMUM}
);
layoutButtons.setHGap( 5 );
JPanel panelBottom = new JPanel( layoutButtons );
panelBottom.add( buttonSave, new TableLayoutConstraints( 0, 0, 0, 0 ) );
panelBottom.add( buttonClose, new TableLayoutConstraints( 1, 0, 1, 0 ) );
TableLayout layout = new TableLayout(
new double[]{TableLayout.FILL},
new double[]{TableLayout.FILL, TableLayout.MINIMUM}
);
layout.setHGap( 5 );
layout.setVGap( 5 );
this.setLayout( layout );
this.add( fieldsPanel, new TableLayoutConstraints(0, 0, 0, 0 ) );
this.add( panelBottom, new TableLayoutConstraints(0, 1, 0, 1, TableLayout.CENTER, TableLayout.CENTER) );
}
示例13: createComponent
import info.clearthought.layout.TableLayout; //导入方法依赖的package包/类
@Override
public JComponent createComponent(GUIFramework framework, Element element) {
JComponent component = super.createComponent(framework, element);
initAttributes(framework.getEngine());
ChartSource source = getChartSource();
key.setSelectedItem(source.getAttributeProperty(BAR_ATTRIBUTE_KEY));
double[][] size = {
{5, TableLayout.MINIMUM, TableLayout.FILL,
TableLayout.MINIMUM, TableLayout.FILL, 5},
{5, TableLayout.FILL, TableLayout.FILL, TableLayout.FILL, 5}};
TableLayout layout = new TableLayout(size);
layout.setHGap(5);
layout.setVGap(5);
JPanel panel = new JPanel(layout);
panel.add(new JLabel(ChartResourceManager
.getString("Label.categoryAxis")), "1,1");
panel.add(categoryAxis, "2,1");
panel.add(
new JLabel(ChartResourceManager.getString("Label.valueAxis")),
"3,1");
panel.add(valueAxis, "4,1");
panel.add(new JLabel(ChartResourceManager.getString("Chart.key")),
"1,2");
panel.add(key, "2,2");
panel.add(new JLabel(ChartResourceManager.getString("Orientation")),
"3,2");
panel.add(orientation, "4,2");
panel.add(new JLabel(ChartResourceManager.getString("Chart.values")),
"1,3,3,3");
attributesSelectPanel = new AttributesSelectPanel(framework, source
.getPropertyAttributes(BAR_ATTRIBUTE_VALUE_PREFIX));
attributesSelectPanel.setPreferredSize(new Dimension(300, 150));
JPanel panel3 = new JPanel(new BorderLayout());
panel3.add(panel, BorderLayout.CENTER);
panel3.add(attributesSelectPanel, BorderLayout.SOUTH);
categoryAxis.setText(source.getProperty(BAR_CATEGORY_AXIS_LABEL));
valueAxis.setText(source.getProperty(BAR_VALUE_AXIS_LABEL));
String o = source.getProperty(BAR_ORIENTATION);
if (BAR_ORIENTATION_HORIZONTAL.equals(o))
orientation.setSelectedIndex(1);
JPanel panel2 = new JPanel(new BorderLayout());
panel2.add(component, BorderLayout.CENTER);
panel2.add(panel3, BorderLayout.SOUTH);
return panel2;
}
示例14: ChartPreferencesDialog
import info.clearthought.layout.TableLayout; //导入方法依赖的package包/类
public ChartPreferencesDialog(GUIFramework framework, Row chart) {
super(framework.getMainFrame(), true);
setDefaultCloseOperation(DISPOSE_ON_CLOSE);
setTitle(ChartResourceManager.getString("Action.ChartPreferences"));
this.framework = framework;
this.chart = chart;
name.setText(chart.getName());
Engine engine = framework.getEngine();
ChartSource chartSource = new ChartSource(engine);
chartSource.load(engine.getInputStream(getPreferencesPath(chart
.getElement(), StandardAttributesPlugin
.getAttributeNameAttribute(engine))));
ChartGUIFramework chartFramework = ChartGUIFramework
.getFramework(framework);
chartPlugin = chartFramework.getChartPlugin(chartSource.getChartType());
editor = chartPlugin.createChartSetupEditor();
double[][] size = {{5, TableLayout.MINIMUM, TableLayout.FILL, 5},
{5, TableLayout.FILL, 5}};
TableLayout layout = new TableLayout(size);
layout.setHGap(5);
layout.setVGap(5);
JPanel top = new JPanel(layout);
top.add(new JLabel(ChartResourceManager.getString("Chart.name")),
"1, 1");
top.add(name, "2, 1");
JPanel panel = new JPanel(new BorderLayout());
panel.add(top, BorderLayout.NORTH);
panel.add(editor.createComponent(framework, chart.getElement()),
BorderLayout.CENTER);
setMainPane(panel);
setMinimumSize(new Dimension(600, 420));
pack();
centerDialog();
Options.loadOptions(this);
}
示例15: CreateChartDialog
import info.clearthought.layout.TableLayout; //导入方法依赖的package包/类
public CreateChartDialog(GUIFramework framework, ChartsView chartsView) {
super(framework.getMainFrame(), true);
setTitle(ChartResourceManager.getString("Action.CreateChart"));
setDefaultCloseOperation(DISPOSE_ON_CLOSE);
this.framework = framework;
this.chartsView = chartsView;
chartFramework = ChartGUIFramework.getFramework(framework);
for (ChartPlugin chartPlugin : chartFramework.getChartPlugins()) {
types.addItem(chartPlugin);
}
double[][] size = {
{5, TableLayout.MINIMUM, TableLayout.FILL,
TableLayout.MINIMUM, TableLayout.FILL, 5},
{5, TableLayout.FILL, 5}};
TableLayout layout = new TableLayout(size);
layout.setHGap(5);
layout.setVGap(5);
JPanel top = new JPanel(layout);
top.add(new JLabel(ChartResourceManager.getString("Chart.type")),
"1, 1");
top.add(types, "2, 1");
top.add(new JLabel(ChartResourceManager.getString("Chart.name")),
"3, 1");
top.add(name, "4, 1");
JPanel panel = new JPanel(new BorderLayout());
panel.add(top, BorderLayout.NORTH);
panel.add(centerPanel, BorderLayout.CENTER);
setPlugin((ChartPlugin) types.getSelectedItem());
types.addItemListener(new ItemListener() {
@Override
public void itemStateChanged(ItemEvent e) {
setPlugin((ChartPlugin) types.getSelectedItem());
}
});
setMinimumSize(new Dimension(600, 420));
setMainPane(panel);
pack();
centerDialog();
Options.loadOptions(this);
}