Package com.jgoodies.forms.layout

Examples of com.jgoodies.forms.layout.FormLayout$ComponentSizeCache


   * Create the GUI
   */
  private void createGui() {
    try {
      CellConstraints cc = new CellConstraints();
      PanelBuilder pb = new PanelBuilder(new FormLayout("5dlu,default:grow,5dlu",
          "pref,5dlu,fill:default:grow,5dlu,pref"), (JPanel) this.getContentPane());
      pb.setDefaultDialogBorder();

      mConfigPanel = new PluginProgramConfigurationPanel(CalendarExportPlugin.getInstance()
          .getSelectedPluginProgramFormattings(), CalendarExportPlugin.getInstance()
          .getAvailableLocalPluginProgramFormatings(), CalendarExportPlugin.getDefaultFormatting(), true, false);

      pb.addSeparator(mLocalizer.msg("title", "Formatings selection"), cc.xyw(1, 1, 3));
      pb.add(mConfigPanel, cc.xy(2, 3));

      FormLayout layout = new FormLayout("0dlu:grow,pref,5dlu,pref", "pref");
      layout.setColumnGroups(new int[][] { { 2, 4 } });

      JPanel buttonPanel = new JPanel(layout);

      JButton ok = new JButton(Localizer.getLocalization(Localizer.I18N_OK));

View Full Code Here


    /**
     * creates a JPanel for getting the time offsets
     */
    private void createPanel() {
      CellConstraints cc = new CellConstraints();
      PanelBuilder pb = new PanelBuilder(new FormLayout("5dlu,12dlu,pref:grow,5dlu,pref:grow,5dlu",
      "pref,5dlu,pref,1dlu,pref,10dlu,pref,5dlu,pref,1dlu,"+
      "pref,10dlu,pref,5dlu,pref,1dlu,pref,7dlu,pref,pref," +
      "pref,pref,pref,7dlu,pref,pref,10dlu,pref"),this);
      pb.setDefaultDialogBorder();
     
View Full Code Here

    /**
     * creates a JPanel for managing the channels
     */
    private void createPanel() {
      CellConstraints cc = new CellConstraints();
      PanelBuilder pb = new PanelBuilder(new FormLayout("5dlu,pref:grow,5dlu","pref,5dlu,fill:default:grow"),this);
      pb.setDefaultDialogBorder();

      ChannelTableModel tableModel = new ChannelTableModel(mData);
      mChannelTable.setModel(tableModel);
      mChannelTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
      mChannelTable.getTableHeader().setReorderingAllowed(false);
      mChannelTable.getColumnModel().getColumn(0).setCellRenderer(new ChannelTableCellRenderer());
      mChannelTable.getColumnModel().getColumn(1).setCellRenderer(new DefaultTableCellRenderer() {
        public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
          JPanel background = new JPanel(new FormLayout("default:grow","fill:default:grow"));
          JLabel label = new JLabel(value.toString());
          label.setOpaque(false);
         
          if(isSelected) {
            background.setBackground(table.getSelectionBackground());
View Full Code Here

    /**
     * creates a JPanel for getting the programpath
     */
    private void createPanel() {
      CellConstraints cc = new CellConstraints();
      PanelBuilder pb = new PanelBuilder(new FormLayout("5dlu,pref,3dlu,pref:grow,3dlu,pref,2dlu",
          "pref,5dlu,pref,3dlu,pref"),this);
      pb.setDefaultDialogBorder();

      pb.addSeparator(mLocalizer.msg("What", "What to start"), cc.xyw(1,1,7));
     
View Full Code Here

  /**
   * creates a JPanel for managing the variables
   */
  private void createPanel() {
    CellConstraints cc = new CellConstraints();
    PanelBuilder pb = new PanelBuilder(new FormLayout("5dlu,pref:grow,5dlu","pref,5dlu,fill:default:grow"),this);
    pb.setDefaultDialogBorder();
   
    DefaultTableCellRenderer renderer = new DefaultTableCellRenderer() {
      public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
        JPanel background = new JPanel(new FormLayout("default:grow","fill:default:grow"));
        JLabel label = new JLabel(value.toString());
        label.setOpaque(false);
       
        if(isSelected) {
          background.setBackground(table.getSelectionBackground());
View Full Code Here

        createGui();
    }

    private void createGui() {
        setLayout(new FormLayout("pref, 3dlu, fill:pref:grow", "pref, 3dlu, pref, 3dlu, pref"));
        setBorder(Borders.DLU4_BORDER);
        CellConstraints cc = new CellConstraints();

        add(new JLabel(mLocalizer.msg("ip", "IP of the Dreambox") + ":"), cc.xy(1, 1));
View Full Code Here

      mPluginArr = channelArr;
      mResultPluginArr = channelArr;
    }

    JPanel contentPane = (JPanel)getContentPane();
    FormLayout layout = new FormLayout("fill:pref:grow", "");
    contentPane.setLayout(layout);
    contentPane.setBorder(Borders.DLU4_BORDER);
    CellConstraints cc = new CellConstraints();
   
    PluginAccess[] pluginAccess = Plugin.getPluginManager().getActivatedPlugins();
   
    ArrayList<Marker> list = new ArrayList<Marker>();
   
    list.add(FavoritesPluginProxy.getInstance());
    list.add(ReminderPluginProxy.getInstance());
   
    for (PluginAccess plugin : pluginAccess) {
      if (plugin.getMarkIcon() != null) {
        list.add(plugin);
      }
    }
    Collections.sort(list, new Comparator<Marker>() {
      public int compare(Marker arg0, Marker arg1) {
        return (arg0.toString().compareTo(arg1.toString()));
      }});

    mPluginItemList = new SelectableItemList(mResultPluginArr, list.toArray());

    int pos = 1;
    layout.appendRow(RowSpec.decode("fill:default:grow"));
    layout.appendRow(RowSpec.decode("3dlu"));
    contentPane.add(mPluginItemList, cc.xy(1,pos));

    pos += 2;
   
    if (description != null) {
      JLabel lb = new JLabel(description);
      layout.appendRow(RowSpec.decode("pref"));
      layout.appendRow(RowSpec.decode("3dlu"));
      contentPane.add(lb, cc.xy(1,pos));
      pos += 2;
    }

    JButton okBt = new JButton(Localizer.getLocalization(Localizer.I18N_OK));
    JButton cancelBt = new JButton(Localizer.getLocalization(Localizer.I18N_CANCEL));

    okBt.addActionListener(new ActionListener(){
      public void actionPerformed(ActionEvent event) {
        Object[] o = mPluginItemList.getSelection();
        mResultPluginArr = new Marker[o.length];
        for (int i=0;i<o.length;i++) {
          mResultPluginArr[i]=(Marker)o[i];
        }
        setVisible(false);
      }
      });

    cancelBt.addActionListener(new ActionListener(){
      public void actionPerformed(ActionEvent event) {
        mResultPluginArr = null;
        setVisible(false);
      }
    });

    ButtonBarBuilder2 builder = new ButtonBarBuilder2();
    builder.addGlue();
    builder.addButton(new JButton[] {okBt, cancelBt});
   
    layout.appendRow(RowSpec.decode("pref"));
    contentPane.add(builder.getPanel(), cc.xy(1,pos));
   
    pack();
  }
View Full Code Here

    UiUtilities.registerForClosing(this);

    JPanel content = (JPanel)getContentPane();
   
    content.setLayout(new FormLayout("5dlu, pref, 3dlu, fill:100dlu:grow(0.5), pref, 5dlu",
        "30dlu, 5dlu, pref, 3dlu, pref, 3dlu, pref, fill:pref:grow, pref, 5dlu"));

    CellConstraints cc = new CellConstraints();

    JPanel panel = new JPanel(new FormLayout("7dlu, pref, fill:pref:grow", "7dlu, center:21dlu, 2dlu, 1px"));
    panel.setOpaque(true);
    panel.setBackground(Color.WHITE);
    panel.setForeground(Color.BLACK);
   
    JLabel top = new JLabel(mLocalizer.msg("title", "Login"));
View Full Code Here

   * Create a new panel builder with the given columns.
   * You can add rows afterwards by using {@link #addParagraph(String)}, {@link #addRow()} and {@link #addGrowingRow()}.
   * @param encodedColumnSpecs
   */
  public EnhancedPanelBuilder(final String encodedColumnSpecs) {
    super(new FormLayout(encodedColumnSpecs,""));
  }
View Full Code Here

   * You can add rows afterwards by using {@link #addParagraph(String)}, {@link #addRow()} and {@link #addGrowingRow()}.
   * @param encodedColumnSpecs
   * @param parentPanel the finally built panel will be a child of this parent panel
   */
  public EnhancedPanelBuilder(final String encodedColumnSpecs, final JPanel parentPanel) {
    super(new FormLayout(encodedColumnSpecs,""), parentPanel);
  }
View Full Code Here

TOP

Related Classes of com.jgoodies.forms.layout.FormLayout$ComponentSizeCache

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.