本文整理汇总了Java中com.jgoodies.forms.layout.RowSpec.decode方法的典型用法代码示例。如果您正苦于以下问题:Java RowSpec.decode方法的具体用法?Java RowSpec.decode怎么用?Java RowSpec.decode使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.jgoodies.forms.layout.RowSpec
的用法示例。
在下文中一共展示了RowSpec.decode方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: Viewer
import com.jgoodies.forms.layout.RowSpec; //导入方法依赖的package包/类
private Viewer() {
setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
setTitle("Fact Tools GUI Development");
//------- add a chart window
//chartPanel.setBackground(Color.WHITE);
//chartPanel.setBorder(new SoftBevelBorder(BevelBorder.LOWERED, null,
// null, null, null));
JMenuBar menu = createMenuBar();
this.setJMenuBar(menu);
// set layout of the main window
FormLayout layout = new FormLayout(new ColumnSpec[]{
ColumnSpec.decode("fill:605px"),
ColumnSpec.decode("fill:605px"),},
new RowSpec[]{
RowSpec.decode("fill:pref"),
RowSpec.decode("fill:pref"),
RowSpec.decode("fill:pref")
});
JPanel panel = new JPanel(layout);
CellConstraints cc = new CellConstraints();
panel.add(chartPanel, cc.xywh(2, 1, 1, 1));
panel.add(eventInfoPanel, cc.xywh(2, 2, 1, 1));
panel.add(mapDisplay, cc.xywh(1, 1, 1, 2));
panel.add(navigation, cc.xywh(1, 3, 2, 1));
setContentPane(panel);
//setSize(1200, 850);
pack();
}
示例2: showWindow
import com.jgoodies.forms.layout.RowSpec; //导入方法依赖的package包/类
public void showWindow() {
JFrame frame = new JFrame();
FormLayout layout = new FormLayout(new ColumnSpec[]{
ColumnSpec.decode("pref"),
ColumnSpec.decode("pref")
},
new RowSpec[]{
RowSpec.decode("pref"),
RowSpec.decode("240px"),
RowSpec.decode("pref"),
RowSpec.decode("240px")
}
);
JPanel panel = new JPanel(layout);
CellConstraints cc = new CellConstraints();
panel.add(plotPanel, cc.xywh(1, 1, 1, 4));
panel.add(new JLabel("Series Selection"), cc.xy(2, 1));
panel.add(keySelector, cc.xy(2, 2));
panel.add(new JLabel("Marker Selection"), cc.xy(2, 3));
panel.add(intervalKeySelector, cc.xy(2, 4));
frame.setContentPane(panel);
frame.pack();
frame.setLocationByPlatform(true);
frame.setVisible(true);
}
示例3: initActionsPanel
import com.jgoodies.forms.layout.RowSpec; //导入方法依赖的package包/类
private void initActionsPanel() {
JPanel actionPanel = new JPanel();
getContentPane().add(actionPanel, BorderLayout.SOUTH);
FormLayout layout = new FormLayout(
new ColumnSpec[] { ColumnSpec.decode("default:grow"), FormFactory.RELATED_GAP_COLSPEC,
FormFactory.DEFAULT_COLSPEC, FormFactory.RELATED_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC,
FormFactory.RELATED_GAP_COLSPEC, ColumnSpec.decode("max(40dlu;default)"),
FormFactory.RELATED_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.RELATED_GAP_COLSPEC,
ColumnSpec.decode("max(40dlu;default)"), FormFactory.RELATED_GAP_COLSPEC,
ColumnSpec.decode("max(5dlu;default)"), },
new RowSpec[] { FormFactory.DEFAULT_ROWSPEC, FormFactory.RELATED_GAP_ROWSPEC,
RowSpec.decode("max(5dlu;default)"), });
actionPanel.setLayout(layout);
JButton btnCancel = new JButton(MESSAGES.get("cancel"));
btnCancel.addActionListener(e -> setVisible(false));
actionPanel.add(btnCancel, "7, 1, 2, 1");
JButton btnOk = new JButton(MESSAGES.get("ok"));
btnOk.addActionListener(e -> {
checkSettingsChanged();
saveConfiguration();
okPressed = true;
setVisible(false);
});
actionPanel.add(btnOk, "11, 1, 2, 1");
}
示例4: EventInfoPanel
import com.jgoodies.forms.layout.RowSpec; //导入方法依赖的package包/类
public EventInfoPanel(int width, int height) {
Bus.eventBus.register(this);
this.setPreferredSize(new Dimension(width, height));
JPanel contentPanel = new JPanel();
contentPanel.setPreferredSize(new Dimension(width - 12, height - 5));
//define some padding using an empty border
roiField.setEditable(false);
timeField.setEditable(false);
runIDField.setEditable(false);
chargeField.setEditable(false);
chargeFieldStd.setEditable(false);
sizeField.setEditable(false);
widthField.setEditable(false);
lengthField.setEditable(false);
roiField.setEnabled(false);
runIDField.setEnabled(false);
timeField.setEnabled(false);
chargeField.setEnabled(false);
chargeFieldStd.setEnabled(false);
sizeField.setEnabled(false);
widthField.setEnabled(false);
lengthField.setEnabled(false);
// set layout of the main window
FormLayout layout = new FormLayout(new ColumnSpec[]{
ColumnSpec.decode("left:100px:grow"),
ColumnSpec.decode("pref"),
ColumnSpec.decode("fill:100px:grow"),
ColumnSpec.decode("pref"),
ColumnSpec.decode("right:pref:grow"),
ColumnSpec.decode("pref"),
},
new RowSpec[]{
RowSpec.decode("fill:12dlu:grow"),//roi and stuff
RowSpec.decode("fill:pref:grow"),
RowSpec.decode("fill:12dlu:grow"),//selection info
RowSpec.decode("top:pref"),
RowSpec.decode("fill:12dlu:grow"), //physics
RowSpec.decode("fill:pref"),
RowSpec.decode("fill:pref"),
RowSpec.decode("fill:pref")
});
JPanel panel = new JPanel(layout);
CellConstraints cc = new CellConstraints();
panel.add(new JLabel("Event Information"), cc.xywh(1, 1, 6, 1));
panel.add(new JLabel("ROI "), cc.xy(1, 2));
panel.add(roiField, cc.xy(2, 2));
panel.add(new JLabel("Time "), cc.xy(3, 2));
panel.add(timeField, cc.xy(4, 2));
panel.add(new JLabel("Run ID "), cc.xy(5, 2));
panel.add(runIDField, cc.xy(6, 2));
panel.add(new JLabel("Selection Information"), cc.xywh(1, 3, 6, 1));
panel.add(new JLabel(("Pixel IDs")), cc.xy(1, 4));
panel.add(new JScrollPane(pixIDList), cc.xywh(2, 4, 5, 1));
panel.add(new JLabel("Addition Physics Information"), cc.xywh(1, 5, 6, 1));
panel.add(new JLabel("Charge Mean/Deviation"), cc.xywh(1, 6, 2, 1));
panel.add(chargeField, cc.xywh(3, 6, 1, 1));
panel.add(chargeFieldStd, cc.xywh(4, 6, 1, 1));
panel.add(new JLabel("Width, Length"), cc.xywh(1, 7, 2, 1));
panel.add(widthField, cc.xywh(3, 7, 1, 1));
panel.add(lengthField, cc.xywh(4, 7, 1, 1));
panel.add(new JLabel("Size (of Shower)"), cc.xywh(1, 8, 2, 1));
panel.add(sizeField, cc.xywh(3, 8, 2, 1));
contentPanel.add(panel);
add(contentPanel);
}