本文整理汇总了Java中info.clearthought.layout.TableLayout.FILL属性的典型用法代码示例。如果您正苦于以下问题:Java TableLayout.FILL属性的具体用法?Java TableLayout.FILL怎么用?Java TableLayout.FILL使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类info.clearthought.layout.TableLayout
的用法示例。
在下文中一共展示了TableLayout.FILL属性的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: 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");
}
示例2: createUpDown
private JComponent createUpDown() {
TableLayout layout = new TableLayout(new double[]{TableLayout.FILL},
new double[]{TableLayout.FILL, 5, TableLayout.FILL});
JPanel panel = new JPanel(layout);
JButton upButton = new JButton(up);
upButton.setFocusable(false);
JButton downButton = new JButton(down);
downButton.setFocusable(false);
panel.add(upButton, "0,0");
panel.add(downButton, "0,2");
JPanel p = new JPanel(new FlowLayout());
p.add(panel);
return p;
}
示例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: initialize
/**
* This method initializes this
*
* @return void
*/
private void initialize() {
double[][] size = {{5, TableLayout.FILL, 5},
{5, TableLayout.FILL, 5}};
this.setLayout(new TableLayout(size));
final GridLayout gridLayout3 = new GridLayout();
JPanel child = new JPanel(gridLayout3);
this.setSize(351, 105);
gridLayout3.setRows(3);
gridLayout3.setColumns(2);
gridLayout3.setHgap(5);
gridLayout3.setVgap(5);
child.add(getJRadioButton(), null);
child.add(getJRadioButton1(), null);
child.add(getJRadioButton2(), null);
child.add(getJRadioButton3(), null);
child.add(getJRadioButton4(), null);
child.add(getJTextField(), null);
this.add(child, "1,1");
}
示例5: 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;
}
示例6: TablePlayersCellRenderer
/**
* Constructor for the cell renderer for the table players.
*/
public TablePlayersCellRenderer () {
// Create the panel used to show the info
double pref = TableLayout.PREFERRED, fill = TableLayout.FILL;
double [][] sizes = {{4, 16, pref},{pref}};
fullPlayerPanel = new JogrePanel(sizes);
fullPlayerPanel.setOpaque (true);
// Create the label that will hold the player's name
playerNameLabel = new JLabel ();
playerNameLabel.setFont (JogreAwt.LIST_FONT);
// Create the rating square that will hold the player's rating
theRatingSquare = new RatingSquare(null);
// Put the name & rating square labels into the panel
fullPlayerPanel.add (theRatingSquare, "1,0,c,c");
fullPlayerPanel.add (playerNameLabel, "2,0,c,c");
}
示例7: UserListRenderer
/**
* Constructor for this renderer.
*/
public UserListRenderer () {
// Set layout
double pref = TableLayout.PREFERRED, fill = TableLayout.FILL;
double [][] sizes = {{fill, pref, 36, 4},{pref}};
setLayout (new TableLayout (sizes));
// Create components and and labels
userLabel = new UserLabel ();
ratingLabel = new JogreLabel ();
tablesLabel = new JogreLabel ();
// Set font of labels
ratingLabel.setFont (JogreAwt.LIST_FONT);
tablesLabel.setFont (JogreAwt.LIST_FONT);
add (userLabel, "0,0,l,c");
add (tablesLabel, "1,0,r,c");
add (ratingLabel, "2,0,r,c");
}
示例8: setupGUI
/**
* Set up the GUI.
*/
private void setupGUI () {
// Set
double pref = TableLayout.PREFERRED, fill = TableLayout.FILL;
double [][] sizes = {{5, 0.5, 30, 0.5, 30, 5},{5, pref, 5, pref, 5}};
setLayout(new TableLayout (sizes));
// Create label
JogreLabel capturesText = new JogreLabel ("Captures: ", 'p', 11);
JogreLabel prisonersText = new JogreLabel ("Prisoners: ", 'p', 11);
JogreLabel areasText = new JogreLabel ("Areas: ", 'p', 11);
JogreLabel territoriesText = new JogreLabel ("Territories: ", 'p', 11);
capturesValue = new JogreLabel ("0", 'p', 11);
this.prisonersValue = new JogreLabel ("0", 'p', 11);
this.areasValue = new JogreLabel ("0", 'p', 11);
this.territoriesValue = new JogreLabel ("0", 'p', 11);
// Add labels
add (capturesText, "1,1"); add (capturesValue, "2,1");
add (prisonersText, "3,1"); add (prisonersValue, "4,1");
add (areasText, "1,3"); add (areasValue, "2,3");
add (territoriesText, "3,3"); add (territoriesValue, "4,3");
setBorder(BorderFactory.createEtchedBorder()); // add an etched border
}
示例9: TicTacToeTableFrame
public TicTacToeTableFrame (TableConnectionThread conn) {
super (conn, WIDTH, HEIGHT);
// Create model, view and register view to model
model = new TicTacToeModel (); // create model
boardComponent = new TicTacToeBoardComponent (model); // board
model.addObserver(boardComponent); // board observes model
// Create controller which updates model and controlls the view
controller = new TicTacToeController (model, boardComponent);
controller.setConnection (conn); // connection
boardComponent.setController(controller);
// Add view to a panel and set on table frame
double [][] sizes = {{10, TableLayout.PREFERRED, 10, TableLayout.FILL, 10}, {10, TableLayout.PREFERRED, TableLayout.FILL}};
JogrePanel panel = new JogrePanel (sizes); // create a panel
panel.add (boardComponent, "1,1,l,t"); // add board to panel
panel.add (new PlayerComponent (conn, 0), "3,1,l,t"); // add board to panel
panel.add (new PlayerComponent (conn, 1), "3,1,l,b"); // add board to panel
setGamePanel (panel); // add panel to table frame
// Set up MVC classes in super class
setupMVC (model, boardComponent, controller);
}
示例10: 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);
}
示例11: EditUserDialog
public EditUserDialog(JDialog dialog, User user, AdminPanelPlugin plugin) {
super(dialog, true);
this.user = user;
this.setDefaultCloseOperation(DISPOSE_ON_CLOSE);
if (user == null) {
setTitle(plugin.getString("UserDialog.Create"));
this.user = new User();
} else {
setTitle(plugin.getString("UserDialog.Edit"));
login.setText(user.getLogin());
name.setText(user.getName());
password.setText(user.getPassword());
login.setEnabled(false);
}
double[][] size = {
{5, TableLayout.FILL, 5, TableLayout.FILL, 5},
{5, TableLayout.FILL, 5, TableLayout.FILL, 5,
TableLayout.FILL, 5}};
TableLayout layout = new TableLayout(size);
JPanel contentPane = new JPanel(layout);
contentPane.add(new JLabel(plugin.getString("UserDialog.Login")),
"1, 1");
contentPane.add(login, "3, 1");
contentPane
.add(new JLabel(plugin.getString("UserDialog.Name")), "1, 3");
contentPane.add(name, "3, 3");
contentPane.add(new JLabel(plugin.getString("UserDialog.Password")),
"1, 5");
contentPane.add(password, "3, 5");
this.setMainPane(contentPane);
this.pack();
this.setMinimumSize(getSize());
this.setLocationRelativeTo(null);
Options.loadOptions(this);
}
示例12: 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);
}
示例13: 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);
}
示例14: 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;
}
示例15: createWideLabeledComponent
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;
}