Package com.jgoodies.forms.layout

Examples of com.jgoodies.forms.layout.CellConstraints$Alignment


    builder.nextLine();
   
    coverCommentTextArea= new JTextArea(3, DEFAULT_COLUMNS);
    coverCommentLabel = builder.append("");
    builder.appendRow("fill:pref:grow"); // second row for text area
    CellConstraints cc = new CellConstraints();
    coverCommentScrollPane = new JScrollPane(coverCommentTextArea);
    builder.add(coverCommentScrollPane,
        cc.xywh(builder.getColumn(), builder.getRow(), 1, 2));
    builder.nextLine(2);
  }
View Full Code Here


        FormLayout layout = new FormLayout("left:15dlu,pref,pref,pref","bottom:14pt,pref,pref,pref,pref");
        layout.setRowGroups(new int[][]{{1, 2, 3, 4, 5}});
        DefaultFormBuilder builder = new DefaultFormBuilder(layout,  optionsPanel);
        builder.setDefaultDialogBorder();
        CellConstraints cc = new CellConstraints();
       
        builder.add(linkInPlace, cc.xyw(1, 1, 4));
        builder.add(destDirLabel, cc.xyw(1, 2, 4));
        builder.add(copyRadioButton, cc.xyw(2, 3, 3));       
        builder.add(moveRadioButton, cc.xyw(2, 4, 3));
        builder.add(renameCheckBox, cc.xyw(2, 5, 1));
        builder.add(renameToTextBox, cc.xyw(4, 5, 1));
       
    }
View Full Code Here

        FormLayout layout = new FormLayout
                ("8dlu, left:pref, 8dlu, fill:150dlu, 4dlu, fill:pref", // 4dlu, left:pref, 4dlu",
                        "pref, 6dlu, pref, 6dlu, pref, 6dlu, pref, 6dlu, pref, 6dlu, "
                                    +"pref, 6dlu, pref, 6dlu, pref, 6dlu, pref");
        DefaultFormBuilder builder = new DefaultFormBuilder(layout);
        CellConstraints cc = new CellConstraints();
        builder.addSeparator(Globals.lang("Editor options"), cc.xyw(1,1, 5));
        builder.add(autoOpenForm, cc.xy(2, 3));
        builder.add(disableOnMultiple, cc.xy(2, 5));
        builder.add(showSource, cc.xy(2, 7));
        builder.add(defSource, cc.xy(2, 9));
        builder.add(autoComplete, cc.xy(2, 11));
        JLabel label = new JLabel(Globals.lang("Use autocompletion for the following fields")+":");
        DefaultFormBuilder builder3 = new DefaultFormBuilder
                (new FormLayout("left:pref, 4dlu, fill:150dlu",""));
        builder3.append(label);
        builder3.append(autoCompFields);
        builder.add(builder3.getPanel(), cc.xyw(2, 13, 3));

        JPanel pan = builder.getPanel();
        pan.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
        add(pan, BorderLayout.CENTER);
View Full Code Here

        FormLayout layout = new FormLayout
                ("1dlu, 8dlu, left:pref, 4dlu, fill:200dlu:grow, 4dlu, fill:pref", // 4dlu, left:pref, 4dlu",
                        "pref, 20dlu, 20dlu, fill:200dlu, 4dlu, pref");//150dlu");
        DefaultFormBuilder builder = new DefaultFormBuilder(layout);

        CellConstraints cc = new CellConstraints();

        /*JLabel description = new JLabel("<HTML>"+Globals.lang("JabRef can switch journal names between "
            +"abbreviated and full form. Since it knows only a limited number of journal names, "
            +"you may need to add your own definitions.")+"</HTML>");*/
        builder.addSeparator(Globals.lang("Personal journal list"), cc.xyw(2,1,6));

        //builder.add(description, cc.xyw(2,1,6));
        builder.add(newFile, cc.xy(3,2));
        builder.add(newNameTf, cc.xy(5,2));
        builder.add(browseNew, cc.xy(7,2));
        builder.add(oldFile, cc.xy(3,3));
        builder.add(personalFile, cc.xy(5,3));
        //BrowseAction action = new BrowseAction(personalFile, false);
        //JButton browse = new JButton(Globals.lang("Browse"));
        //browse.addActionListener(action);
        builder.add(browseOld, cc.xy(7,3));

        userPanel.setLayout(new BorderLayout());
        //builtInTable = new JTable(Globals.journalAbbrev.getTableModel());
        builder.add(userPanel, cc.xyw(2,4,4));
        ButtonStackBuilder butBul = new ButtonStackBuilder();
        butBul.addGridded(add);
        butBul.addGridded(remove);

        butBul.addGlue();
        builder.add(butBul.getPanel(), cc.xy(7,4));

        builder.addSeparator(Globals.lang("External files"), cc.xyw(2,6,6));
        externalFilesPanel.setLayout(new BorderLayout());
        //builder.add(/*new JScrollPane(*/externalFilesPanel/*)*/, cc.xyw(2,8,6));

        setLayout(new BorderLayout());
        builder.getPanel().setBorder(BorderFactory.createEmptyBorder(5,5,5,5));//createMatteBorder(1,1,1,1,Color.green));
View Full Code Here

    private JPanel createControlPanel()
    {
        FormLayout layout = new FormLayout( "pref, 3dlu, pref, 3dlu:grow",
                                            "pref, 15dlu, pref, 15dlu, pref, 3dlu:grow, pref" );
        PanelBuilder builder = new PanelBuilder( layout );
        CellConstraints cc = new CellConstraints( );

        String title = ConwayApplicationProperties.getProperty( "app.title" );
        builder.addLabel( title,
                          cc.xywh( 1,
                                   1,
                                   layout.getColumnCount( ),
                                   1 ) );

        String info = ConwayApplicationProperties.getProperty( "app.description" );
        builder.addLabel( info,
                          cc.xywh( 1,
                                   3,
                                   layout.getColumnCount( ),
                                   1 ) );

        final String patternLabel = ConwayApplicationProperties.getProperty( "pattern.label" );
        builder.addLabel( patternLabel,
                          cc.xy( 1,
                                 5 ) );

        builder.add( patternSelector,
                     cc.xy( 3,
                            5 ) );
        JPanel buttonPanel = ButtonBarFactory.buildLeftAlignedBar( nextGenerationButton,
                                                                   startStopButton,
                                                                   clearButton );
        builder.add( buttonPanel,
                     cc.xywh( 1,
                              7,
                              layout.getColumnCount( ),
                              1 ) );

        Border etchedBorder = BorderFactory.createEtchedBorder( EtchedBorder.LOWERED );
View Full Code Here

   void addFillComponents( Container panel, int[] cols, int[] rows )
   {
      Dimension filler = new Dimension(10,10);

      boolean filled_cell_11 = false;
      CellConstraints cc = new CellConstraints();
      if ( cols.length > 0 && rows.length > 0 )
      {
         if ( cols[0] == 1 && rows[0] == 1 )
         {
            /** add a rigid area  */
            panel.add( Box.createRigidArea( filler ), cc.xy(1,1) );
            filled_cell_11 = true;
         }
      }

      for( int index = 0; index < cols.length; index++ )
      {
         if ( cols[index] == 1 && filled_cell_11 )
         {
            continue;
         }
         panel.add( Box.createRigidArea( filler ), cc.xy(cols[index],1) );
      }

      for( int index = 0; index < rows.length; index++ )
      {
         if ( rows[index] == 1 && filled_cell_11 )
         {
            continue;
         }
         panel.add( Box.createRigidArea( filler ), cc.xy(1,rows[index]) );
      }

   }
View Full Code Here

   public JPanel createPanel()
   {
      JPanel jpanel1 = new JPanel();
      FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:NONE,FILL:8DLU:NONE,FILL:84PX:NONE,FILL:DEFAULT:NONE,FILL:97PX:NONE,FILL:DEFAULT:NONE,FILL:109PX:NONE,FILL:DEFAULT:NONE,FILL:95PX:NONE,FILL:25PX:NONE,FILL:8DLU:NONE,FILL:8DLU:NONE,FILL:DEFAULT:NONE","CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,FILL:174PX:NONE,CENTER:4DLU:NONE,CENTER:DEFAULT:NONE");
      CellConstraints cc = new CellConstraints();
      jpanel1.setLayout(formlayout1);

      _LOG_AREA.setName("LOG_AREA");
      JScrollPane jscrollpane1 = new JScrollPane();
      jscrollpane1.setViewportView(_LOG_AREA);
      jscrollpane1.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
      jscrollpane1.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
      jpanel1.add(jscrollpane1,cc.xywh(3,14,9,1));

      TitledSeparator titledseparator1 = new TitledSeparator();
      titledseparator1.setText("Log");
      jpanel1.add(titledseparator1,cc.xywh(3,13,9,1));

      jpanel1.add(_titledborderbottom1,cc.xywh(3,15,9,1));

      JLabel jlabel1 = new JLabel();
      jlabel1.setText("Action");
      jpanel1.add(jlabel1,cc.xy(3,8));

      _INSTALL_OPTION.setActionCommand("Install Service");
      _INSTALL_OPTION.setName("INSTALL_OPTION");
      _INSTALL_OPTION.setText("Install Service");
      _buttongroup1.add(_INSTALL_OPTION);
      jpanel1.add(_INSTALL_OPTION,cc.xy(5,8));

      _CONSOLE_OPTION.setActionCommand("Run Console");
      _CONSOLE_OPTION.setName("CONSOLE_OPTION");
      _CONSOLE_OPTION.setText("Run Console");
      _buttongroup1.add(_CONSOLE_OPTION);
      jpanel1.add(_CONSOLE_OPTION,cc.xy(5,9));

      JLabel jlabel2 = new JLabel();
      jlabel2.setText("Application");
      jpanel1.add(jlabel2,cc.xy(3,4));

      JLabel jlabel3 = new JLabel();
      jlabel3.setText("Install Folder");
      jpanel1.add(jlabel3,cc.xy(3,6));

      _APPLICATION.setName("APPLICATION");
      _APPLICATION.setText("???");
      jpanel1.add(_APPLICATION,cc.xywh(5,4,6,1));

      jpanel1.add(_titledborderside1,cc.xywh(2,13,1,3));

      _START_OPTION.setActionCommand("& Start");
      _START_OPTION.setName("START_OPTION");
      _START_OPTION.setText("Start Service");
      jpanel1.add(_START_OPTION,cc.xy(7,8));

      _INSTALL_FOLDER.setName("INSTALL_FOLDER");
      jpanel1.add(_INSTALL_FOLDER,cc.xywh(5,6,6,1));

      _TRAY_ICON_OPTION.setActionCommand("& Tray Icon");
      _TRAY_ICON_OPTION.setName("TRAY_ICON_OPTION");
      _TRAY_ICON_OPTION.setText("Tray Icon");
      jpanel1.add(_TRAY_ICON_OPTION,cc.xy(9,8));

      jpanel1.add(createPanel1(),cc.xywh(2,11,11,1));
      _SELECT_FOLDER_BUTTON.setActionCommand("...");
      _SELECT_FOLDER_BUTTON.setName("SELECT_FOLDER_BUTTON");
      _SELECT_FOLDER_BUTTON.setText("...");
      jpanel1.add(_SELECT_FOLDER_BUTTON,cc.xy(12,6));

      _SHOW_CONF_BUTTON.setActionCommand("...");
      _SHOW_CONF_BUTTON.setName("SHOW_CONF_BUTTON");
      _SHOW_CONF_BUTTON.setText("...");
      jpanel1.add(_SHOW_CONF_BUTTON,cc.xy(12,4));

      JLabel jlabel4 = new JLabel();
      jlabel4.setFont(new Font("Tahoma",Font.BOLD,16));
      jlabel4.setText("YAJSW - Java Web Start Booter");
      jlabel4.setHorizontalAlignment(JLabel.CENTER);
      jpanel1.add(jlabel4,cc.xywh(2,2,11,1));

      _titledborderside2.setOrientation(TitledBorderSide.RIGHT);
      jpanel1.add(_titledborderside2,cc.xywh(12,13,1,3));

      addFillComponents(jpanel1,new int[]{ 1,2,3,4,5,6,7,8,9,10,11,12,13 },new int[]{ 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16 });
      return jpanel1;
   }
View Full Code Here

   public JPanel createPanel1()
   {
      JPanel jpanel1 = new JPanel();
      FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:NONE,FILL:DEFAULT:NONE,FILL:235PX:NONE,FILL:86PX:NONE,FILL:DEFAULT:NONE,FILL:DEFAULT:NONE","CENTER:DEFAULT:NONE");
      CellConstraints cc = new CellConstraints();
      jpanel1.setLayout(formlayout1);

      _GO_BUTTON.setActionCommand("Start");
      _GO_BUTTON.setName("GO_BUTTON");
      _GO_BUTTON.setText("Continue");
      jpanel1.add(_GO_BUTTON,cc.xy(2,1));

      _CANCEL_BUTTON.setActionCommand("Cancel");
      _CANCEL_BUTTON.setName("CANCEL_BUTTON");
      _CANCEL_BUTTON.setText("Close");
      jpanel1.add(_CANCEL_BUTTON,cc.xy(5,1));

      _STATE.setFont(new Font("Tahoma",Font.BOLD,12));
      _STATE.setName("STATE");
      _STATE.setText("Starting");
      _STATE.setHorizontalAlignment(JLabel.CENTER);
      jpanel1.add(_STATE,cc.xy(3,1));

      _SPEED.setName("SPEED");
      jpanel1.add(_SPEED,cc.xy(4,1));

      addFillComponents(jpanel1,new int[]{ 1,6 },new int[]{ 1 });
      return jpanel1;
   }
View Full Code Here

   void addFillComponents( Container panel, int[] cols, int[] rows )
   {
      Dimension filler = new Dimension(10,10);

      boolean filled_cell_11 = false;
      CellConstraints cc = new CellConstraints();
      if ( cols.length > 0 && rows.length > 0 )
      {
         if ( cols[0] == 1 && rows[0] == 1 )
         {
            /** add a rigid area  */
            panel.add( Box.createRigidArea( filler ), cc.xy(1,1) );
            filled_cell_11 = true;
         }
      }

      for( int index = 0; index < cols.length; index++ )
      {
         if ( cols[index] == 1 && filled_cell_11 )
         {
            continue;
         }
         panel.add( Box.createRigidArea( filler ), cc.xy(cols[index],1) );
      }

      for( int index = 0; index < rows.length; index++ )
      {
         if ( rows[index] == 1 && filled_cell_11 )
         {
            continue;
         }
         panel.add( Box.createRigidArea( filler ), cc.xy(1,rows[index]) );
      }

   }
View Full Code Here

   public JPanel createPanel()
   {
      JPanel jpanel1 = new JPanel();
      FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:143PX:NONE,FILL:249PX:NONE,FILL:DEFAULT:NONE","CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:4DLU:NONE,CENTER:DEFAULT:NONE,CENTER:12DLU:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE");
      CellConstraints cc = new CellConstraints();
      jpanel1.setLayout(formlayout1);

      JLabel jlabel1 = new JLabel();
      jlabel1.setFont(new Font("Tahoma",Font.BOLD,11));
      jlabel1.setText("YAJSW Configuration");
      jpanel1.add(jlabel1,cc.xy(2,6));

      jpanel1.add(createPanel1(),cc.xywh(2,8,4,1));
      JLabel jlabel2 = new JLabel();
      jlabel2.setFont(new Font("Tahoma",Font.BOLD,12));
      jlabel2.setText("Reload YAJSW Console Application");
      jlabel2.setHorizontalAlignment(JLabel.CENTER);
      jpanel1.add(jlabel2,cc.xywh(2,2,4,1));

      _CONFIGURATION.setEditable(true);
      _CONFIGURATION.setName("CONFIGURATION");
      _CONFIGURATION.setRequestFocusEnabled(false);
      jpanel1.add(_CONFIGURATION,cc.xywh(4,6,2,1));

      JLabel jlabel3 = new JLabel();
      jlabel3.setFont(new Font("Tahoma",Font.BOLD,11));
      jlabel3.setText("Console");
      jpanel1.add(jlabel3,cc.xy(2,4));

      _SERVICE.setEnabled(false);
      _SERVICE.setName("SERVICE");
      jpanel1.add(_SERVICE,cc.xy(4,4));

      _MESSAGE.setName("MESSAGE");
      jpanel1.add(_MESSAGE,cc.xywh(2,9,4,1));

      addFillComponents(jpanel1,new int[]{ 1,2,3,4,5,6 },new int[]{ 1,2,3,4,5,6,7,8,9,10 });
      return jpanel1;
   }
View Full Code Here

TOP

Related Classes of com.jgoodies.forms.layout.CellConstraints$Alignment

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.