本文整理汇总了Java中info.clearthought.layout.TableLayout.MINIMUM属性的典型用法代码示例。如果您正苦于以下问题:Java TableLayout.MINIMUM属性的具体用法?Java TableLayout.MINIMUM怎么用?Java TableLayout.MINIMUM使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类info.clearthought.layout.TableLayout
的用法示例。
在下文中一共展示了TableLayout.MINIMUM属性的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setupLayout
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: initialize
/**
* This method initializes this
*
* @return void
*/
private void initialize() {
double[][] size = {
{5, TableLayout.FILL, 5, TableLayout.MINIMUM, 5,
TableLayout.FILL, 5, TableLayout.MINIMUM, 5},
{5, TableLayout.MINIMUM, 5, TableLayout.FILL, 5}};
setLayout(new TableLayout(size));
jLabel1 = new JLabel();
jLabel1.setText(GlobalResourcesManager
.getString("HierarchicalAttributes"));
jLabel = new JLabel();
jLabel.setText(GlobalResourcesManager.getString("PresentAttributes"));
this.add(jLabel, "1,1");
this.add(jLabel1, "5, 1");
this.add(getJScrollPane1(), "1,3");
this.add(getJPanel1(), "3,3");
this.add(getJScrollPane(), "5,3");
this.add(getJPanel(), "7,3");
}
示例3: NewJavaScriptDialog
public NewJavaScriptDialog(GUIFramework framework) {
super(framework.getMainFrame(), true);
this.engine = framework.getEngine();
setTitle(ScriptPlugin.getBundle()
.getString("NewJavaScriptDialog.title"));
double[][] size = {{5, TableLayout.FILL, TableLayout.MINIMUM, 5},
{5, TableLayout.MINIMUM, 5}};
JPanel panel = new JPanel(new TableLayout(size));
panel.add(moduleName, "1, 1");
panel.add(new JLabel(".js"), "2, 1");
setMainPane(panel);
this.pack();
this.setMinimumSize(getSize());
centerDialog();
Options.loadOptions(this);
}
示例4: createSourceTypePanel
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;
}
示例5: init
private void init() {
double[][] size = {
{DIV_SPACE, TableLayout.MINIMUM, DIV_SPACE, TableLayout.FILL,
DIV_SPACE}, {DIV_SPACE, TableLayout.FILL, DIV_SPACE}};
JPanel panel = new JPanel(new TableLayout(size));
panel.add(
new JLabel(GlobalResourcesManager.getString("ElementListName")),
"1, 1");
panel.add(nameField, "3, 1");
Attribute attribute = getAttribute();
if (attribute != null)
nameField.setText(attribute.getName());
JPanel main = new JPanel(new BorderLayout());
main.add(panel, BorderLayout.NORTH);
AttributePlugin attributePlugin = framework
.findAttributePlugin(getAttributeType());
editor = (ElementListPreferenciesEditor) attributePlugin
.getAttributePreferenciesEditor();
JPanel panel2 = new JPanel(new BorderLayout());
panel2.add(editor.createComponent(getAttribute(), engine, rules),
BorderLayout.CENTER);
main.add(panel2, BorderLayout.CENTER);
setMainPane(main);
}
示例6: CreateBaseFunctionDialog
public CreateBaseFunctionDialog(JFrame frame, Engine engine,
AccessRules rules) {
super(frame, true);
setDefaultCloseOperation(DISPOSE_ON_CLOSE);
this.engine = engine;
this.rules = rules;
this.setTitle(GlobalResourcesManager.getString("CreateFunction"));
double[][] size = {{5, TableLayout.MINIMUM, 5, TableLayout.FILL, 5},
{5, TableLayout.FILL, 5}};
JPanel panel = new JPanel(new TableLayout(size));
panel.add(new JLabel(ResourceLoader.getString("name")), "1,1");
field.setPreferredSize(new Dimension(220,
field.getPreferredSize().height));
panel.add(field, "3,1");
ButtonGroup bg = new ButtonGroup();
bg.add(idef0);
bg.add(dfd);
bg.add(dfds);
JPanel jPanel = new JPanel(new FlowLayout(FlowLayout.LEFT));
idef0.setSelected(true);
jPanel.add(idef0);
jPanel.add(dfd);
jPanel.add(dfds);
JPanel jPanel2 = new JPanel(new BorderLayout());
jPanel2.add(panel, BorderLayout.CENTER);
jPanel2.add(jPanel, BorderLayout.SOUTH);
this.setMainPane(jPanel2);
setMinSizePack();
centerDialog();
this.setResizable(false);
}
示例7: init
private void init() {
double[][] size = {
{5, TableLayout.MINIMUM, 5, TableLayout.FILL},
{5, TableLayout.MINIMUM, 5, TableLayout.MINIMUM, 5,
TableLayout.MINIMUM, 5, TableLayout.MINIMUM, 5}};
this.setTitle(getString("Preferences.Title"));
JPanel panel = new JPanel(new TableLayout(size));
JLabel path = new JLabel(getString("Base.Location"));
panel.add(path, "1, 1");
panel.add(createLocationSector(), "3, 1");
panel.add(new JLabel(getString("WebPort")), "1, 3");
panel.add(webPort, "3, 3");
//panel.add(new JLabel(), "1, 5");
panel.add(canUndoRedo, "3, 5");
//panel.add(new JLabel(), "1, 7");
panel.add(autostart, "3, 7");
setMainPane(panel);
pack();
centerDialog();
setResizable(false);
}
示例8: createComponent
@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;
}
示例9: setupLayout
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) );
}
示例10: createFirstTab
protected Component createFirstTab(JTabbedPane pane) {
double[][] size = {{5, TableLayout.MINIMUM, 5, TableLayout.FILL, 5},
{5, TableLayout.MINIMUM, 5, TableLayout.MINIMUM}};
JPanel panel = new JPanel(new BorderLayout());
JPanel c = new JPanel(new TableLayout(size));
c.add(new JLabel("row:"), "1,1");
c.add(qualifier, "3,1");
c.add(new JLabel("element:"), "1,3");
c.add(element, "3,3");
panel.add(c, BorderLayout.NORTH);
JPanel jPanel = new JPanel(new BorderLayout());
JPanel jPanel2 = new JPanel(new FlowLayout(FlowLayout.RIGHT));
JButton button = new JButton("set_dfd_object");
jPanel2.add(button);
button.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
SelectRowDialog dialog = new SelectRowDialog(
DFDObjectDialog.this) {
};
dialog.setSelectType(SelectType.RADIO);
dialog.init(framework, dataPlugin, framework.getAccessRules());
List<Row> list = dialog.showModal();
if ((list != null) && (list.size() > 0)) {
setLink(list.get(0));
}
}
});
jPanel.add(jPanel2, BorderLayout.NORTH);
panel.add(jPanel, BorderLayout.CENTER);
return panel;
}
示例11: createGeneralPanel
private Component createGeneralPanel() {
double[][] size = {
{5, TableLayout.FILL, 5},
{5, TableLayout.MINIMUM, 5, TableLayout.MINIMUM, 5,
TableLayout.MINIMUM, 5, TableLayout.MINIMUM, 5,
TableLayout.MINIMUM, 5, TableLayout.MINIMUM, 5,
TableLayout.MINIMUM, 5, TableLayout.MINIMUM, 5,
TableLayout.MINIMUM, 5, TableLayout.MINIMUM, 5}};
JPanel panel = new JPanel(new TableLayout(size));
panel.add(new JLabel(ResourceLoader.getString("autor:")), "1,1");
panel.add(author, "1,3");
panel.add(new JLabel(ResourceLoader.getString("creation_date:")), "1,5");
panel.add(createDate, "1,7");
panel.add(new JLabel(ResourceLoader.getString("rev_date:")), "1,9");
panel.add(revDate, "1,11");
panel.add(new JLabel(ResourceLoader.getString("page_size:")), "1,13");
panel.add(sizesBox, "1,15");
panel.add(
new JLabel(ResourceLoader.getString("horizontal_page_count:")),
"1,17");
panel.add(horizontalPageCountBox, "1,19");
sizesBox.addItem("A4");
sizesBox.addItem("A3");
horizontalPageCountBox.addItem("1");
horizontalPageCountBox.addItem("2");
horizontalPageCountBox.addItem("3");
horizontalPageCountBox.addItem("4");
horizontalPageCountBox.addItem("5");
horizontalPageCountBox.addItem("6");
horizontalPageCountBox.addItem("7");
horizontalPageCountBox.addItem("8");
horizontalPageCountBox.addItem("9");
horizontalPageCountBox.addItem("10");
return panel;
}
示例12: createBottomPanel
private Component createBottomPanel() {
double[][] size = {
{5, TableLayout.MINIMUM, 5, TableLayout.FILL, 5,
TableLayout.MINIMUM, 5},
{5, TableLayout.MINIMUM, 5, TableLayout.MINIMUM, 5,
TableLayout.MINIMUM, 5}};
JPanel panel = new JPanel(new TableLayout(size));
imageSizeComboBox = new JComboBox();
imageSizeComboBox.addItem("799x530");
imageSizeComboBox.addItem("904x601");
imageSizeComboBox.addItem("1023x680");
imageSizeComboBox.addItem("1151x765");
imageSizeComboBox.addItem("1299x864");
imageSizeComboBox.addItem("1600x1064");
imageTypeComboBox = new JComboBox();
imageTypeComboBox.addItem(".bmp");
imageTypeComboBox.addItem(".png");
imageTypeComboBox.addItem(".jpg");
imageTypeComboBox.addItem(".svg");
imageTypeComboBox.addItem(".emf");
imageTypeComboBox.setSelectedIndex(1);
panel.add(new JLabel(ResourceLoader.getString("ImageSize")), "1,1");
panel.add(imageSizeComboBox, "3,1,5,1");
panel.add(new JLabel(ResourceLoader.getString("ImageType")), "1,3");
panel.add(imageTypeComboBox, "3,3,5,3");
panel.add(new Label(ResourceLoader.getString("Folder")), "1, 5");
panel.add(directory, "3, 5");
panel.add(new JButton(new AbstractAction(GlobalResourcesManager
.getString("Action.Browse")) {
@Override
public void actionPerformed(ActionEvent e) {
JFileChooser fileChooser = new JFileChooser();
fileChooser.setSelectedFile(new File(directory.getText()));
fileChooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
int r = fileChooser.showOpenDialog(null);
if (r == JFileChooser.APPROVE_OPTION)
directory.setText(fileChooser.getSelectedFile()
.getAbsolutePath());
}
}), "5, 5");
return panel;
}
示例13: createComponent
@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
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
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);
}