List of usage examples for com.jgoodies.forms.layout CellConstraints FILL
Alignment FILL
To view the source code for com.jgoodies.forms.layout CellConstraints FILL.
Click Source Link
From source file:presentation.movieguide.GuiTabMovieGuide.java
License:Open Source License
private void initialize() { FormLayout layout = new FormLayout("320px:grow,10, 400px:grow", // columns "pref, f:200px:grow, 10, pref, pref, pref"); // rows PanelBuilder builder = new PanelBuilder(this, layout); builder.setDefaultDialogBorder();/* w ww. jav a2 s.c o m*/ CellConstraints cc = new CellConstraints(); builder.addSeparator(ControlMain.getProperty("datum"), cc.xywh(1, 1, 1, 1)); builder.add(this.getJPanelChannels(), cc.xywh(1, 2, 1, 1, CellConstraints.FILL, CellConstraints.FILL)); builder.addSeparator(ControlMain.getProperty("prog_info"), cc.xywh(3, 1, 1, 1)); builder.add(this.getJPanelInfo(), cc.xywh(3, 2, 1, 1)); builder.addSeparator(ControlMain.getProperty("suche"), cc.xywh(1, 4, 1, 1, CellConstraints.FILL, CellConstraints.FILL)); builder.add(this.getJPanelSuche(), cc.xywh(1, 5, 1, 1, CellConstraints.FILL, CellConstraints.FILL)); builder.add(this.getJPanelSucheErw(), cc.xywh(1, 6, 1, 1, CellConstraints.FILL, CellConstraints.FILL)); builder.addSeparator(ControlMain.getProperty("akt_mg"), cc.xywh(3, 4, 1, 1)); builder.add(this.getJPanelDownload(), cc.xywh(3, 5, 1, 1, CellConstraints.FILL, CellConstraints.FILL)); builder.add(this.getJPanelProgressBar(), cc.xywh(3, 6, 1, 1, CellConstraints.FILL, CellConstraints.FILL)); }
From source file:presentation.movieguide.GuiTabMovieGuide.java
License:Open Source License
private JPanel getJPanelChannels() { if (jPanelChannel == null) { jPanelChannel = new JPanel(); FormLayout layout = new FormLayout("320px:grow", //column "pref, pref, 120px:grow, pref"); //rows PanelBuilder builder = new PanelBuilder(jPanelChannel, layout); CellConstraints cc = new CellConstraints(); builder.add(this.getJPanelDatum(), cc.xyw(1, 1, 1, CellConstraints.FILL, CellConstraints.FILL)); builder.addSeparator(ControlMain.getProperty("titel"), cc.xyw(1, 2, 1)); builder.add(this.getJScrollPaneChannels(), cc.xyw(1, 3, 1, CellConstraints.FILL, CellConstraints.FILL)); builder.add(this.getJButtonSelectedToTimer(), cc.xyw(1, 4, 1, CellConstraints.FILL, CellConstraints.FILL)); }/*from w w w. j a v a 2 s . com*/ return jPanelChannel; }
From source file:presentation.program.GuiTabProgramm.java
License:Open Source License
/** * This method initializes jPanelEpgDetails * //from ww w .j a va2 s .c o m * @return javax.swing.JPanel */ private JPanel getJPanelEpgDetails() { if (jPanelEpgDetails == null) { jPanelEpgDetails = new JPanel(); FormLayout layout = new FormLayout("f:d:grow", //columns "pref, 5, f:d:grow"); //rows PanelBuilder builder = new PanelBuilder(jPanelEpgDetails, layout); CellConstraints cc = new CellConstraints(); builder.addSeparator(ControlMain.getProperty("label_epgDetails"), cc.xy(1, 1, CellConstraints.FILL, CellConstraints.TOP)); builder.add(this.getJScrollPaneEPGDetail(), cc.xy(1, 3)); } return jPanelEpgDetails; }
From source file:presentation.program.GuiTabProgramm.java
License:Open Source License
/** * This method initializes jPanelButtonsAktionen * /* w w w .j a v a 2 s . c om*/ * @return javax.swing.JPanel */ private JPanel getJPanelButtonsAktionen() { if (jPanelButtonsAktionen == null) { jPanelButtonsAktionen = new JPanel(); FormLayout layout = new FormLayout("30, 130", //columna "pref, 5, pref, 5, pref, 5, pref, 5, pref"); //rows PanelBuilder builder = new PanelBuilder(jPanelButtonsAktionen, layout); CellConstraints cc = new CellConstraints(); builder.addSeparator(ControlMain.getProperty("label_actions"), cc.xywh(1, 1, 2, 1)); builder.add(this.getJButtonPlayback(), cc.xyw(1, 3, 2, CellConstraints.FILL, CellConstraints.FILL)); builder.add(this.getJButtonRefresh(), cc.xyw(1, 5, 1, CellConstraints.FILL, CellConstraints.FILL)); builder.add(this.getJComboBoxBoxIP(), cc.xyw(2, 5, 1, CellConstraints.FILL, CellConstraints.FILL)); builder.addSeparator(ControlMain.getProperty("label_sserver"), cc.xyw(1, 7, 2)); builder.add(this.getJButtonStartServer(), cc.xyw(1, 9, 2, CellConstraints.FILL, CellConstraints.FILL)); } return jPanelButtonsAktionen; }
From source file:presentation.program.GuiTabProgramm.java
License:Open Source License
private JPanel getJPanelChannels() { if (jPanelChannel == null) { jPanelChannel = new JPanel(); FormLayout layout = new FormLayout("100,100", //column "pref, pref, 4, pref, pref, min:grow, pref"); //rows PanelBuilder builder = new PanelBuilder(jPanelChannel, layout); CellConstraints cc = new CellConstraints(); builder.addSeparator(ControlMain.getProperty("label_date"), cc.xyw(1, 1, 2)); builder.add(this.getJDateChooser(), cc.xyw(1, 2, 2, CellConstraints.FILL, CellConstraints.FILL)); builder.addSeparator(ControlMain.getProperty("label_zapping"), cc.xyw(1, 4, 2)); builder.add(this.getJComboBoxBouquets(), cc.xyw(1, 5, 2, CellConstraints.FILL, CellConstraints.FILL)); builder.add(this.getJScrollPaneChannels(), cc.xyw(1, 6, 2, CellConstraints.FILL, CellConstraints.FILL)); builder.add(this.getJRadioButtonTVMode(), cc.xy(1, 7)); builder.add(this.getJRadioButtonRadioMode(), cc.xy(2, 7)); }/* w w w . j a v a2s . com*/ return jPanelChannel; }
From source file:presentation.timer.GuiBoxTimerPanel.java
License:Open Source License
private void initialize() { FormLayout layout = new FormLayout("f:320:grow, 10, 100:grow, 160:grow, 7, pref", // columns "pref, t:220:grow, pref, 10, pref, 90:grow, 90:grow, 20"); // rows PanelBuilder builder = new PanelBuilder(this, layout); builder.setDefaultDialogBorder();/*from w w w .j ava 2 s . co m*/ CellConstraints cc = new CellConstraints(); builder.addSeparator(ControlMain.getProperty("label_recordTimer"), cc.xyw(1, 1, 4)); builder.add(this.getJScrollPaneRecordTimerTable(), cc.xyw(1, 2, 4)); builder.add(this.getJPanelDauerTimer(), cc.xyw(1, 3, 4, CellConstraints.CENTER, CellConstraints.TOP)); builder.addSeparator(ControlMain.getProperty("label_systemTimer"), cc.xyw(1, 5, 4)); builder.add(this.getJScrollPaneSystemTimerTable(), cc.xywh(1, 6, 4, 2)); builder.add(this.getJPanelDauerTimer2(), cc.xyw(1, 8, 4, CellConstraints.CENTER, CellConstraints.TOP)); builder.addTitle(ControlMain.getProperty("label_actRecTimer"), cc.xy(6, 1)); builder.add(this.getJPanelButtonsRecordTimer(), cc.xywh(6, 2, 1, 1, CellConstraints.FILL, CellConstraints.TOP)); builder.addTitle(ControlMain.getProperty("label_actSysTimer"), cc.xy(6, 5, CellConstraints.CENTER, CellConstraints.DEFAULT)); builder.add(this.getJPanelButtonsSystemTimer(), cc.xywh(6, 6, 1, 1, CellConstraints.CENTER, CellConstraints.TOP)); builder.add(this.getJPanelButtonsGui(), cc.xywh(6, 7, 1, 2, CellConstraints.CENTER, CellConstraints.BOTTOM)); }
From source file:presentation.timer.GuiBoxTimerPanel.java
License:Open Source License
public JPanel getJPanelButtonsSystemTimer() { if (jPanelButtonsSystemTimer == null) { jPanelButtonsSystemTimer = new JPanel(); FormLayout layout = new FormLayout("f:pref", //columna "pref, pref, pref, "); //rows PanelBuilder builder = new PanelBuilder(jPanelButtonsSystemTimer, layout); CellConstraints cc = new CellConstraints(); builder.add(this.getJButtonNewSystemtimer(), cc.xyw(1, 1, 1, CellConstraints.FILL, CellConstraints.FILL)); builder.add(this.getJButtonDeleteSelectedSystemTimer(), cc.xy(1, 2)); builder.add(this.getJButtonDeleteAllSystemTimer(), cc.xy(1, 3)); }/*ww w. j av a 2 s .c o m*/ return jPanelButtonsSystemTimer; }
From source file:se.streamsource.streamflow.client.ui.account.AccountView.java
License:Apache License
public AccountView(@Service ApplicationContext context, @Structure Module module) { this.context = context; ActionMap am = context.getActionMap(this); setActionMap(am);//from w ww . j ava 2s .c o m JPanel panel = new JPanel(new BorderLayout()); panel.setBorder(new EmptyBorder(new Insets(10, 10, 10, 10))); accountForm = new JPanel(); panel.add(accountForm, BorderLayout.NORTH); FormLayout accountLayout = new FormLayout("75dlu, 5dlu, 120dlu:grow", "pref, pref, pref, pref, pref"); DefaultFormBuilder accountBuilder = new DefaultFormBuilder(accountLayout, accountForm); // accountBuilder.setDefaultDialogBorder(); accountBinder = module.objectBuilderFactory().newObject(StateBinder.class); accountBinder.setResourceMap(context.getResourceMap(getClass())); connectedBinder = module.objectBuilderFactory().newObject(StateBinder.class); AccountSettingsValue accountTemplate = accountBinder.bindingTemplate(AccountSettingsValue.class); accountBuilder.appendSeparator(i18n.text(AccountResources.account_separator)); accountBuilder.nextLine(); accountBuilder.add(new JLabel(i18n.text(AccountResources.account_name_label))); accountBuilder.nextColumn(2); accountBuilder.add(accountBinder.bind(TEXTFIELD.newField(), accountTemplate.name())); accountBuilder.nextLine(); accountBuilder.add(new JLabel(i18n.text(AccountResources.server_label))); accountBuilder.nextColumn(2); accountBuilder.add(accountBinder.bind(TEXTFIELD.newField(), accountTemplate.server())); accountBuilder.nextLine(); accountBuilder.add(new JLabel(i18n.text(AccountResources.username_label))); accountBuilder.nextColumn(2); accountBuilder.add(accountBinder.bind(TEXTFIELD.newField(), accountTemplate.userName())); accountBuilder.nextLine(); accountBuilder.add(new JLabel(i18n.text(AccountResources.password_label))); accountBuilder.nextColumn(2); accountBuilder.add(accountBinder.bind(PASSWORD.newField(), accountTemplate.password())); accountBuilder.nextLine(); accountEditor = new FormEditor(accountForm); contactForm = new JPanel(); panel.add(contactForm, BorderLayout.CENTER); FormLayout contactLayout = new FormLayout("75dlu, 5dlu,80dlu, 80dlu", "pref, pref, pref, pref, pref, pref, pref, pref, pref, pref, pref, pref"); DefaultFormBuilder contactBuilder = new DefaultFormBuilder(contactLayout, contactForm); JToggleButton editBtn = new JToggleButton(am.get("edit")); editBtn.setHorizontalAlignment(SwingConstants.LEFT); contactBuilder.add(editBtn, new CellConstraints(4, 5, 1, 1, CellConstraints.FILL, CellConstraints.BOTTOM, new Insets(0, 0, 0, 0))); StreamflowButton testBtn = new StreamflowButton(am.get("test")); testBtn.setHorizontalAlignment(SwingConstants.LEFT); contactBuilder.add(testBtn, new CellConstraints(4, 6, 1, 1, CellConstraints.FILL, CellConstraints.BOTTOM, new Insets(0, 0, 0, 0))); StreamflowButton changepasswordBtn = new StreamflowButton(am.get("changepassword")); changepasswordBtn.setHorizontalAlignment(SwingConstants.LEFT); contactBuilder.add(changepasswordBtn, new CellConstraints(4, 7, 1, 1, CellConstraints.FILL, CellConstraints.BOTTOM, new Insets(0, 0, 0, 0))); setViewportView(panel); }
From source file:se.streamsource.streamflow.client.ui.administration.forms.definition.FieldEditView.java
License:Apache License
private JPanel createVisibilityRulePanel() { rulePanel = new JPanel(); FormLayout ruleFormLayout = new FormLayout("45dlu, 5dlu, 150dlu, 5dlu, 45dlu, 5dlu, 150dlu:grow", "pref, pref, pref, pref:grow"); DefaultFormBuilder ruleFormBuilder = new DefaultFormBuilder(ruleFormLayout, rulePanel); ruleFormBuilder.addSeparator(text(AdministrationResources.visibility_rule)); ruleFormBuilder.setBorder(Borders.createEmptyBorder("4dlu, 4dlu, 4dlu, 4dlu")); ruleFormBuilder.nextLine();/*ww w. j a va 2 s . c o m*/ ruleFormBuilder.add(new JLabel(text(AdministrationResources.rule_field_id))); ruleFormBuilder.nextColumn(2); ruleFormBuilder.add(valueBinder.bind("fieldId", actionBinder.bind("changeRuleFieldId", ruleFieldIdCombo))); ruleFieldIdCombo.setRenderer(new LinkListCellRenderer()); ruleFormBuilder.nextColumn(2); ruleFormBuilder.add(new JLabel(text(AdministrationResources.rule_values))); ruleFormBuilder.add( module.objectBuilderFactory().newObjectBuilder(VisibilityRuleValuesView.class) .use(model.newVisibilityRuleValuesModel()).newInstance(), new CellConstraints(7, 2, 1, 3, CellConstraints.FILL, CellConstraints.FILL)); ruleFormBuilder.nextLine(); ruleFormBuilder.add(new JLabel(text(AdministrationResources.rule_condition))); ruleFormBuilder.nextColumn(2); ruleFormBuilder .add(valueBinder.bind("condition", actionBinder.bind("changeRuleCondition", ruleConditionCombo))); ruleConditionCombo.setRenderer(new DefaultListRenderer() { public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { if (value instanceof LinkValue) { LinkValue itemValue = (LinkValue) value; String val = itemValue == null ? "" : text(VisibilityRuleCondition.valueOf(itemValue.text().get())); return super.getListCellRendererComponent(list, val, index, isSelected, cellHasFocus); } else return super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus); } }); //ruleFormBuilder.nextLine(); ruleFormBuilder.add(new JLabel(text(AdministrationResources.rule_visible_when)), new CellConstraints(1, 4, 1, 1, CellConstraints.FILL, CellConstraints.TOP)); //ruleFormBuilder.nextColumn( 2 ); javax.swing.Action visibilityWhenToTrueAction = am.get("changeVisibleWhenToTrue"); javax.swing.Action visibilityWhenToFalseAction = am.get("changeVisibleWhenToFalse"); JXRadioGroup buttonGroup = new JXRadioGroup(); buttonGroup.setLayoutAxis(BoxLayout.LINE_AXIS); visibleWhenTrue = new JRadioButton(visibilityWhenToTrueAction); visibleWhenFalse = new JRadioButton(visibilityWhenToFalseAction); buttonGroup.add(visibleWhenTrue); buttonGroup.add(visibleWhenFalse); ruleFormBuilder.add(buttonGroup, new CellConstraints(3, 4, 1, 1, CellConstraints.FILL, CellConstraints.TOP)); return rulePanel; }
From source file:se.streamsource.streamflow.client.ui.administration.forms.definition.PageEditView.java
License:Apache License
public PageEditView(@Service ApplicationContext context, @Uses PageEditModel model, @Structure Module module) { this.model = model; JPanel panel = new JPanel(new BorderLayout()); refreshComponents = new RefreshComponents(); ActionMap am = context.getActionMap(this); valueBinder = module.objectBuilderFactory().newObject(ValueBinder.class); actionBinder = module.objectBuilderFactory().newObjectBuilder(ActionBinder.class) .use(context.getActionMap(this)).newInstance(); actionBinder.setResourceMap(context.getResourceMap(getClass())); JPanel topPanel = new JPanel(new BorderLayout()); JPanel fieldPanel = new JPanel(); FormLayout fieldFormLayout = new FormLayout("45dlu, 5dlu, 150dlu:grow", "pref, pref"); DefaultFormBuilder fieldFormBuilder = new DefaultFormBuilder(fieldFormLayout, fieldPanel); fieldFormBuilder.setBorder(Borders.createEmptyBorder("4dlu, 4dlu, 4dlu, 4dlu")); fieldFormBuilder.append(text(AdministrationResources.type_label), new JLabel(text(AdministrationResources.page_break_field_type))); fieldFormBuilder.nextLine();/*from w w w. java 2 s. co m*/ fieldFormBuilder.add(new JLabel(text(AdministrationResources.name_label))); fieldFormBuilder.nextColumn(2); fieldFormBuilder .add(valueBinder.bind("description", actionBinder.bind("changeDescription", descriptionField))); topPanel.add(fieldPanel, BorderLayout.NORTH); JPanel rulePanel = new JPanel(); FormLayout ruleFormLayout = new FormLayout("45dlu, 5dlu, 150dlu, 5dlu, 45dlu, 5dlu, 150dlu:grow", "pref, pref, pref, pref:grow"); DefaultFormBuilder ruleFormBuilder = new DefaultFormBuilder(ruleFormLayout, rulePanel); ruleFormBuilder.addSeparator(text(AdministrationResources.visibility_rule)); ruleFormBuilder.setBorder(Borders.createEmptyBorder("4dlu, 4dlu, 4dlu, 4dlu")); ruleFormBuilder.nextLine(); ruleFormBuilder.add(new JLabel(text(AdministrationResources.rule_field_id))); ruleFormBuilder.nextColumn(2); ruleFormBuilder.add(valueBinder.bind("fieldId", actionBinder.bind("changeRuleFieldId", ruleFieldIdCombo))); ruleFieldIdCombo.setRenderer(new LinkListCellRenderer()); ruleFormBuilder.nextColumn(2); ruleFormBuilder.add(new JLabel(text(AdministrationResources.rule_values))); VisibilityRuleValuesView visibilityRuleValuesView = module.objectBuilderFactory() .newObjectBuilder(VisibilityRuleValuesView.class).use(model.newVisibilityRuleValuesModel()) .newInstance(); //visibilityRuleValuesView.setMaximumSize( new Dimension(150, 75 ) ); ruleFormBuilder.add(visibilityRuleValuesView, new CellConstraints(7, 2, 1, 3, CellConstraints.FILL, CellConstraints.FILL)); ruleFormBuilder.nextLine(); ruleFormBuilder.add(new JLabel(text(AdministrationResources.rule_condition))); ruleFormBuilder.nextColumn(2); ruleFormBuilder .add(valueBinder.bind("condition", actionBinder.bind("changeRuleCondition", ruleConditionCombo))); ruleConditionCombo.setRenderer(new DefaultListRenderer() { public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { if (value instanceof LinkValue) { LinkValue itemValue = (LinkValue) value; String val = itemValue == null ? "" : text(VisibilityRuleCondition.valueOf(itemValue.text().get())); return super.getListCellRendererComponent(list, val, index, isSelected, cellHasFocus); } else return super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus); } }); ruleFormBuilder.add(new JLabel(text(AdministrationResources.rule_visible_when)), new CellConstraints(1, 4, 1, 1, CellConstraints.FILL, CellConstraints.TOP)); javax.swing.Action visibilityWhenToTrueAction = am.get("changeVisibleWhenToTrue"); javax.swing.Action visibilityWhenToFalseAction = am.get("changeVisibleWhenToFalse"); buttonGroup = new JXRadioGroup(); buttonGroup.setLayoutAxis(BoxLayout.LINE_AXIS); visibleWhenTrue = new JRadioButton(visibilityWhenToTrueAction); visibleWhenFalse = new JRadioButton(visibilityWhenToFalseAction); buttonGroup.add(visibleWhenTrue); buttonGroup.add(visibleWhenFalse); ruleFormBuilder.add(buttonGroup, new CellConstraints(3, 4, 1, 1, CellConstraints.FILL, CellConstraints.TOP)); topPanel.add(rulePanel, BorderLayout.CENTER); panel.add(topPanel, BorderLayout.NORTH); panel.add(new JPanel(), BorderLayout.CENTER); refreshComponents.visibleOn("possiblerulefields", rulePanel); setViewportView(panel); new RefreshWhenShowing(this, this); }