Java Code Examples for java.awt.BorderLayout

The following code examples are extracted from open source projects. You can click to vote up the examples that are useful to you.

Example 1

From project codjo-segmentation, under directory /codjo-segmentation-gui/src/main/java/net/codjo/segmentation/gui/wizard/.

Source file: ClassificationStep.java

  18 
vote

private void jbInit(){
  BorderLayout borderLayout=new BorderLayout();
  borderLayout.setVgap(5);
  setLayout(borderLayout);
  setBorder(new EmptyBorder(0,0,5,0));
  classificationTable.setName("AssistantSegmentation.ListeDesAxes");
  add(new JScrollPane(classificationTable),BorderLayout.CENTER);
  JScrollPane pane=new JScrollPane(mainPanel);
  pane.setBorder(new EmptyBorder(0,0,0,0));
  add(pane,BorderLayout.EAST);
  infoField=new JLabel();
  infoField.setName("Summary");
  add(infoField,BorderLayout.SOUTH);
}
 

Example 2

From project addis, under directory /application/src/main/java/org/drugis/addis/gui/components/.

Source file: NotesView.java

  17 
vote

public NotesView(ObservableList<Note> notes,boolean editable){
  super(new BorderLayout());
  d_notes=notes;
  d_editable=editable;
  add(buildPanel(),BorderLayout.CENTER);
  d_notes.addListDataListener(new NotesListener());
}
 

Example 3

From project beanmill_1, under directory /src/main/java/com/traxel/lumbermill/.

Source file: MillView.java

  17 
vote

/** 
 * -------------------------------------- Instance Initialization --------------------------------------
 * @param logActiveStateView  DOCUMENT ME!
 * @param logStatus           DOCUMENT ME!
 * @param tableStatus         DOCUMENT ME!
 * @param eventsPanel         DOCUMENT ME!
 * @param filterSetView       DOCUMENT ME!
 */
public MillView(final LogActiveStateView logActiveStateView,final LogStatus logStatus,final TableStatus tableStatus,final EventsPanel eventsPanel,final FilterSetView filterSetView){
  final JSplitPane treeEventsSplit;
  final JPanel logStateStatusPanel;
  logStateStatusPanel=new JPanel();
  logStateStatusPanel.add(logActiveStateView);
  logStateStatusPanel.add(logStatus);
  logStateStatusPanel.add(tableStatus);
  treeEventsSplit=new JSplitPane(JSplitPane.HORIZONTAL_SPLIT,filterSetView,eventsPanel);
  setLayout(new BorderLayout());
  add(BorderLayout.NORTH,logStateStatusPanel);
  add(BorderLayout.CENTER,treeEventsSplit);
}
 

Example 4

From project bioclipse.speclipse, under directory /plugins/net.bioclipse.specmol/src/net/bioclipse/specmol/editor/.

Source file: SpecMolPeackChartComposite.java

  17 
vote

/** 
 * initializes the composite by creating and adding a peak chart
 * @param AssignmentPage page 
 */
private void init(AssignmentPage page){
  GridLayout layout=new GridLayout();
  this.setLayout(layout);
  GridData layoutData=new GridData(GridData.FILL_BOTH);
  this.setLayoutData(layoutData);
  Frame fileTableFrame=SWT_AWT.new_Frame(this);
  fileTableFrame.setLayout(new BorderLayout());
  chart=SpectrumChartFactory.createPeakChart(null,null,null);
  chart.setTitle("empty chart");
  chartPanel=new SpokChartPanel(chart,"peak",null,null);
  fileTableFrame.add(chartPanel,BorderLayout.CENTER);
  chartPanel.addMouseListener(page.getPeakChartCompositeMouseListener());
}
 

Example 5

From project ceres, under directory /ceres-ui/src/main/java/com/bc/ceres/swing/update/.

Source file: ModuleManagerPane.java

  17 
vote

public ModuleManagerPane(ModuleManager moduleManager){
  super(new BorderLayout(2,2));
  Assert.notNull(moduleManager,"moduleManager");
  this.moduleManager=moduleManager;
  this.syncAction=new SyncAction();
  this.clearAction=new ClearAction();
  this.installAction=new InstallAction();
  this.updateAction=new UpdateAction();
  this.uninstallAction=new UninstallAction();
  this.selectAllAction=new SelectAllAction();
  this.categoriesSet=new HashSet<CaselessKey>(20);
  repositoryTroubleShootingMessage="";
  initUi();
}
 

Example 6

From project Cinch, under directory /example/com/palantir/ptoss/cinch/example/dynamic/.

Source file: DynamicControls.java

  17 
vote

private void initializeInterface(){
  JPanel toPanel=new JPanel(new BorderLayout());
  toPanel.add(new JLabel("Count"),BorderLayout.WEST);
  slider.setPaintLabels(true);
  slider.setLabelTable(slider.createStandardLabels(1));
  slider.setSnapToTicks(true);
  toPanel.add(slider,BorderLayout.CENTER);
  panel.setLayout(new BorderLayout());
  panel.add(toPanel,BorderLayout.NORTH);
  checkboxPanel.setLayout(new BoxLayout(checkboxPanel,BoxLayout.Y_AXIS));
  checkboxPanel.setPreferredSize(new Dimension(200,300));
  panel.add(checkboxPanel,BorderLayout.CENTER);
  panel.setBorder(BorderFactory.createEmptyBorder(10,10,10,10));
}
 

Example 7

From project codjo-data-process, under directory /codjo-data-process-gui/src/main/java/net/codjo/dataprocess/gui/launcher/configuration/.

Source file: ConfigurationDialog.java

  17 
vote

private void initRightPanel(){
  trtConfigurationTable.initConfigurationTableModel();
  rightPanel.setLayout(new BorderLayout());
  TitledBorder rightTitledBorder=new TitledBorder(" Param?res ");
  rightPanel.setBorder(rightTitledBorder);
  trtConfigScrollPane.getViewport().add(trtConfigurationTable,null);
  rightPanel.add(trtConfigScrollPane,BorderLayout.CENTER);
}
 

Example 8

From project collaborative-editor, under directory /mpedit/gui/.

Source file: CDialogTemplate.java

  17 
vote

protected void init(){
  getContentPane().setLayout(new BorderLayout());
  this.setResizable(false);
  JPanel panel_buttons=this.drawButtonPanel();
  getContentPane().add(panel_buttons,BorderLayout.SOUTH);
  setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
  setLocation((int)(Toolkit.getDefaultToolkit().getScreenSize().width / 4),(int)(Toolkit.getDefaultToolkit().getScreenSize().height / 4));
}
 

Example 9

From project dawn-common, under directory /org.dawb.hdf5/src/ncsa/hdf/view/.

Source file: DefaultMetaDataView.java

  17 
vote

private JPanel createNamedDatatypeInfoPanel(Datatype t){
  JPanel panel=new JPanel();
  panel.setLayout(new BorderLayout());
  JTextArea infoArea=new JTextArea(t.getDatatypeDescription());
  infoArea.setEditable(false);
  panel.add(infoArea,BorderLayout.CENTER);
  return panel;
}
 

Example 10

From project des, under directory /daemon/lib/apache-log4j-1.2.16/src/main/java/org/apache/log4j/chainsaw/.

Source file: DetailPanel.java

  17 
vote

/** 
 * Creates a new <code>DetailPanel</code> instance.
 * @param aTable the table to listen for selections on
 * @param aModel the model backing the table
 */
DetailPanel(JTable aTable,final MyTableModel aModel){
  mModel=aModel;
  setLayout(new BorderLayout());
  setBorder(BorderFactory.createTitledBorder("Details: "));
  mDetails=new JEditorPane();
  mDetails.setEditable(false);
  mDetails.setContentType("text/html");
  add(new JScrollPane(mDetails),BorderLayout.CENTER);
  final ListSelectionModel rowSM=aTable.getSelectionModel();
  rowSM.addListSelectionListener(this);
}
 

Example 11

From project drools-planner, under directory /drools-planner-examples/src/main/java/org/drools/planner/examples/machinereassignment/swingui/.

Source file: MrMachinePanel.java

  17 
vote

public MrMachinePanel(MachineReassignmentPanel machineReassignmentPanel,List<MrResource> resourceList,MrMachine machine){
  super(new BorderLayout());
  this.machineReassignmentPanel=machineReassignmentPanel;
  this.resourceList=resourceList;
  this.machine=machine;
  setBorder(BorderFactory.createCompoundBorder(BorderFactory.createCompoundBorder(BorderFactory.createEmptyBorder(1,2,1,2),BorderFactory.createLineBorder(Color.BLACK)),BorderFactory.createEmptyBorder(1,1,1,1)));
  createUI();
}
 

Example 12

From project droolsjbpm-integration, under directory /droolsjbpm-integration-examples/src/main/java/org/drools/examples/broker/ui/.

Source file: LogPanel.java

  17 
vote

public LogPanel(){
  setLayout(new BorderLayout());
  log=new JTextArea();
  log.setEditable(false);
  JScrollPane areaScrollPane=new JScrollPane(log);
  areaScrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
  add(areaScrollPane,BorderLayout.CENTER);
  setBorder(BorderFactory.createEmptyBorder(10,10,10,10));
  setPreferredSize(new Dimension(400,50));
}
 

Example 13

From project e4-rendering, under directory /com.toedter.e4.ui.workbench.renderers.swing/src/com/toedter/e4/ui/workbench/renderers/swing/.

Source file: WorkbenchWindowRenderer.java

  17 
vote

@Override public void createWidget(MUIElement element,MElementContainer<MUIElement> parent){
  if (element instanceof MWindow) {
    MWindow mWindow=(MWindow)element;
    JFrame jFrame=new JFrame();
    jFrame.getContentPane().setLayout(new BorderLayout());
    jFrame.setBounds(mWindow.getX(),mWindow.getY(),mWindow.getWidth(),mWindow.getHeight());
    jFrame.setTitle(mWindow.getLocalizedLabel());
    element.setWidget(jFrame);
    ((MWindow)element).getContext().set(JFrame.class,jFrame);
  }
}
 

Example 14

From project empire-db, under directory /empire-db-examples/empire-db-example-cxf/src/main/java/org/apache/empire/samples/cxf/wssample/client/.

Source file: ClientGUI.java

  17 
vote

/** 
 * This method initializes _actionPanel
 * @return javax.swing.JPanel
 */
private JPanel get_actionPanel(){
  if (_actionPanel == null) {
    _actionPanel=new JPanel();
    _actionPanel.setLayout(new BorderLayout());
    _actionPanel.add(get_btnSearch(),BorderLayout.EAST);
    _actionPanel.add(get_txtSearchValue(),BorderLayout.CENTER);
  }
  return _actionPanel;
}
 

Example 15

From project alg-vis, under directory /src/algvis/gui/.

Source file: VisPanel.java

  16 
vote

private JPanel initScreen(){
  JPanel screenP=new JPanel();
  screenP.setLayout(new BorderLayout());
  screen=new Screen(){
    private static final long serialVersionUID=2196788670749006364L;
    @Override public Dimension getMaximumSize(){
      return new Dimension(Integer.MAX_VALUE,Integer.MAX_VALUE);
    }
    @Override public Dimension getPreferredSize(){
      return new Dimension(550,400);
    }
    @Override public Dimension getMinimumSize(){
      return new Dimension(550,400);
    }
  }
;
  screenP.add(screen,BorderLayout.CENTER);
  border=BorderFactory.createTitledBorder("");
  border.setTitleJustification(TitledBorder.CENTER);
  border.setTitleFont(new Font("Sans-serif",Font.ITALIC,12));
  Languages.addListener(this);
  screenP.setBorder(BorderFactory.createCompoundBorder(border,BorderFactory.createEmptyBorder(0,5,5,5)));
  return screenP;
}
 

Example 16

From project autopsy, under directory /Core/src/org/sleuthkit/autopsy/filesearch/.

Source file: FileSearchPanel.java

  16 
vote

/** 
 * This method is called from within the constructor to initialize the form.
 */
private void customizeComponents(){
  this.setLayout(new BorderLayout());
  JPanel filterPanel=new JPanel();
  filterPanel.setLayout(new BoxLayout(filterPanel,BoxLayout.Y_AXIS));
  filterPanel.setBorder(new EmptyBorder(10,10,10,10));
  this.add(filterPanel,BorderLayout.CENTER);
  JLabel label=new JLabel("Search for files that match the following criteria:");
  label.setAlignmentX(Component.LEFT_ALIGNMENT);
  label.setBorder(new EmptyBorder(0,0,10,0));
  filterPanel.add(label);
  this.filterAreas.add(new FilterArea("Name",new NameSearchFilter()));
  List<FileSearchFilter> metadataFilters=new ArrayList<FileSearchFilter>();
  metadataFilters.add(new SizeSearchFilter());
  metadataFilters.add(new DateSearchFilter());
  this.filterAreas.add(new FilterArea("Metadata",metadataFilters));
  this.filterAreas.add(new FilterArea("Known Status",new KnownStatusSearchFilter()));
  for (  FilterArea fa : this.filterAreas) {
    fa.setMaximumSize(new Dimension(Integer.MAX_VALUE,fa.getMinimumSize().height));
    fa.setAlignmentX(Component.LEFT_ALIGNMENT);
    filterPanel.add(fa);
  }
  this.searchButton=new JButton("Search");
  this.searchButton.setAlignmentX(Component.LEFT_ALIGNMENT);
  filterPanel.add(searchButton);
  addListenerToAll(new ActionListener(){
    @Override public void actionPerformed(    ActionEvent e){
      search();
    }
  }
);
}
 

Example 17

From project Bit4Tat, under directory /Bit4Tat/src/com/Bit4Tat/.

Source file: FilePanel.java

  16 
vote

public FilePanel(Wallet w){
  super(w);
  this.setLayout(new BorderLayout());
  this.setBackground(Color.WHITE);
  this.add(createHeaderPanel("file_small.png","File"),BorderLayout.NORTH);
  SubPanel subPanel=new SubPanel();
  subPanel.setLayout(new CardLayout());
  subPanel.setBorder(BorderFactory.createMatteBorder(1,0,0,0,Color.DARK_GRAY));
  SubPanel newWalletPanel=new SubPanel("Create a New Wallet");
  subPanel.add("New Wallet",newWalletPanel);
  SubPanel editWalletPanel=new SubPanel("Edit a Wallet");
  subPanel.add("Edit Wallet",editWalletPanel);
  SubPanel loadWalletPanel=new SubPanel("Load a Wallet");
  subPanel.add("Load Wallet",loadWalletPanel);
  SubPanel saveWalletPanel=new SubPanel("Save a Wallet");
  subPanel.add("Save Wallet",saveWalletPanel);
  JPanel sidePanel=createSidePanel(this,subPanel,"Header","New Wallet","Edit Wallet","Load Wallet","Save Wallet");
  this.add(sidePanel,BorderLayout.WEST);
  this.add(subPanel);
  currentSubPanel=newWalletPanel;
}
 

Example 18

From project Calendar-Application, under directory /com/toedter/calendar/demo/.

Source file: JCalendarDemo.java

  16 
vote

/** 
 * Initializes the applet.
 */
public void init(){
  initializeLookAndFeels();
  beans=new JComponent[6];
  beans[0]=new DateChooserPanel();
  beans[1]=new JCalendar();
  beans[2]=new JDayChooser();
  beans[3]=new JMonthChooser();
  beans[4]=new JYearChooser();
  beans[5]=new JSpinField();
  ((JSpinField)beans[5]).adjustWidthToMaximumValue();
  ((JYearChooser)beans[4]).setMaximum(((JSpinField)beans[5]).getMaximum());
  ((JYearChooser)beans[4]).adjustWidthToMaximumValue();
  getContentPane().setLayout(new BorderLayout());
  setJMenuBar(createMenuBar());
  toolBar=createToolBar();
  getContentPane().add(toolBar,BorderLayout.NORTH);
  splitPane=new JSplitPane(JSplitPane.VERTICAL_SPLIT);
  splitPane.setBorder(BorderFactory.createLineBorder(Color.GRAY));
  splitPane.setDividerSize(4);
  splitPane.setDividerLocation(240);
  BasicSplitPaneDivider divider=((BasicSplitPaneUI)splitPane.getUI()).getDivider();
  if (divider != null) {
    divider.setBorder(null);
  }
  propertyPanel=new JPanel();
  componentPanel=new JPanel();
  URL iconURL=beans[0].getClass().getResource("images/" + beans[0].getName() + "Color16.gif");
  ImageIcon icon=new ImageIcon(iconURL);
  propertyTitlePanel=new JTitlePanel("Properties",null,propertyPanel,BorderFactory.createEmptyBorder(4,4,4,4));
  componentTitlePanel=new JTitlePanel("Component",icon,componentPanel,BorderFactory.createEmptyBorder(4,4,0,4));
  splitPane.setBottomComponent(propertyTitlePanel);
  splitPane.setTopComponent(componentTitlePanel);
  installBean(beans[0]);
  getContentPane().add(splitPane,BorderLayout.CENTER);
}
 

Example 19

From project Clotho-Core, under directory /ClothoApps/ConnectionConfigTool/src/org/clothocad/tool/connectconfigtool/.

Source file: blueTextField.java

  16 
vote

public blueTextField(String fieldname,String initialvalue){
  fieldName=fieldname;
  oldValue=initialvalue;
  setLayout(new BorderLayout());
  setMaximumSize(new Dimension(textfieldwidth + labelwidth,2 * textsize + 2));
  setPreferredSize(new Dimension(textfieldwidth + labelwidth,2 * textsize + 2));
  setOpaque(false);
  label=new JLabel(fieldName);
  label.setForeground(Color.WHITE);
  label.setFont(new java.awt.Font("Arial",Font.BOLD,textsize));
  label.setPreferredSize(new Dimension(labelwidth,2 * textsize));
  add(label,BorderLayout.WEST);
  textField=new JTextField();
  textField.setBackground(navyblue);
  textField.setFont(new java.awt.Font("Arial",Font.PLAIN,textsize));
  textField.setForeground(Color.WHITE);
  textField.setBorder(null);
  textField.setText(initialvalue);
  textField.addFocusListener(this);
  textField.setPreferredSize(new Dimension(textfieldwidth,2 * textsize));
  add(textField,BorderLayout.EAST);
}
 

Example 20

From project codjo-broadcast, under directory /codjo-broadcast-gui/src/main/java/net/codjo/broadcast/gui/.

Source file: BroadcastFileContentsDetailWindow.java

  16 
vote

private void initGui() throws Exception {
  this.setResizable(true);
  this.getContentPane().setBackground(UIManager.getColor("Panel.background"));
  this.setPreferredSize(new Dimension(430,430));
  this.getContentPane().setLayout(borderLayout1);
  mainPanel.setLayout(gridBagLayout3);
  columnPanel.setBorder(new TitledBorder(BorderFactory.createEtchedBorder(Color.white,new Color(142,142,142)),""));
  columnPanel.setLayout(gridBagLayout2);
  columnSeparator.setMaxTextLength(2);
  sectionPanel.setLayout(gridBagLayout1);
  sectionPosition.setColumns(0);
  headerPanel.setBorder(new TitledBorder(BorderFactory.createEtchedBorder(Color.white,new Color(134,134,134)),""));
  headerPanel.setLayout(new BorderLayout());
  headerPanel.add(headerScrollPane,BorderLayout.CENTER);
  dataSource.addDataSourceListener(new net.codjo.mad.gui.request.event.DataSourceAdapter(){
    @Override public void saveEvent(    DataSourceEvent event){
      dataSourceSaveEvent();
    }
  }
);
  sectionTabPanel.setName("tabPanel");
  this.getContentPane().add(sectionTabPanel,BorderLayout.CENTER);
  this.getContentPane().add(buttonPanelLogic.getGui(),BorderLayout.SOUTH);
  sectionTabPanel.add(mainPanel,"Section");
  columnPanel.add(separatorLabel,new GridBagConstraints(0,0,1,1,0.0,0.0,GridBagConstraints.WEST,GridBagConstraints.NONE,new Insets(0,5,5,0),0,0));
  columnPanel.add(columnSeparator,new GridBagConstraints(1,0,1,1,1.0,0.0,GridBagConstraints.WEST,GridBagConstraints.HORIZONTAL,new Insets(0,5,5,0),51,0));
  columnPanel.add(columnHeader,new GridBagConstraints(2,0,1,1,0.0,0.0,GridBagConstraints.CENTER,GridBagConstraints.NONE,new Insets(0,18,5,165),0,0));
  sectionPanel.add(sectionNameLabel,new GridBagConstraints(0,0,1,1,0.0,0.0,GridBagConstraints.WEST,GridBagConstraints.NONE,new Insets(10,5,0,12),8,0));
  sectionPanel.add(sectionId,new GridBagConstraints(1,0,2,1,1.0,0.0,GridBagConstraints.CENTER,GridBagConstraints.HORIZONTAL,new Insets(10,5,0,10),181,0));
  sectionPanel.add(positionLabel,new GridBagConstraints(0,1,1,1,0.0,0.0,GridBagConstraints.WEST,GridBagConstraints.NONE,new Insets(10,5,0,0),0,0));
  sectionPanel.add(sectionPosition,new GridBagConstraints(1,1,1,1,1.0,0.0,GridBagConstraints.WEST,GridBagConstraints.HORIZONTAL,new Insets(10,5,0,0),30,0));
  sectionPanel.add(sectionHeader,new GridBagConstraints(2,1,1,1,0.0,0.0,GridBagConstraints.EAST,GridBagConstraints.NONE,new Insets(10,92,0,10),0,0));
  sectionPanel.add(headerPanel,new GridBagConstraints(0,2,3,1,1.0,1.0,GridBagConstraints.CENTER,GridBagConstraints.BOTH,new Insets(10,5,5,5),0,0));
  mainPanel.add(columnPanel,new GridBagConstraints(0,1,1,1,1.0,1.0,GridBagConstraints.CENTER,GridBagConstraints.BOTH,new Insets(0,0,0,9),-5,0));
  headerScrollPane.getViewport().add(sectionHeaderText,null);
  mainPanel.add(sectionPanel,new GridBagConstraints(0,0,1,1,1.0,1.0,GridBagConstraints.CENTER,GridBagConstraints.BOTH,new Insets(0,0,0,9),4,54));
}
 

Example 21

From project codjo-control, under directory /codjo-control-gui/src/main/java/net/codjo/control/gui/plugin/.

Source file: DefaultQuarantineWindow.java

  16 
vote

private void initLayout(){
  waitingPanel=new WaitingPanel(translate("DefaultQuarantineWindow.waitingPanel",guiContext));
  setGlassPane(waitingPanel);
  JScrollPane scrollPane=new JScrollPane();
  scrollPane.getViewport().add(requestTable,null);
  JPanel mainPanel=new JPanel(new BorderLayout());
  mainPanel.add(scrollPane,BorderLayout.CENTER);
  toolBar=new RequestToolBar();
  toolBar.setBorder(BorderFactory.createEtchedBorder());
  JPanel bottomPanel=new JPanel(new BorderLayout());
  bottomPanel.add(toolBar,BorderLayout.CENTER);
  filterPanel=new QuarantineFilterPanel(requestTable);
  filterPanel.setWithSearchButton(false);
  filterPanel.setPostponedLoad(true);
  filterPanel.setBorder(new TitledBorder(new EtchedBorder(EtchedBorder.RAISED,Color.white,new Color(134,134,134)),translate("DefaultQuarantineWindow.filterPanel.title",guiContext)));
  this.getContentPane().setLayout(new BorderLayout());
  this.getContentPane().add(mainPanel,BorderLayout.CENTER);
  this.getContentPane().add(bottomPanel,BorderLayout.SOUTH);
  this.getContentPane().add(filterPanel,BorderLayout.NORTH);
  final WindowData window=guiData.getWindow();
  setPreferredSize(new Dimension(window.getWindowWidth(),window.getWindowHeight()));
}
 

Example 22

From project codjo-standalone-common, under directory /src/main/java/net/codjo/gui/.

Source file: FieldLabelWindow.java

  16 
vote

/** 
 * Init GUI.
 * @exception SQLException Description of Exception
 * @exception PersistenceException Description of Exception
 */
private void jbInit() throws SQLException, PersistenceException {
  fieldLabelTable=new GenericTable(tableHome.getTable("PM_FIELD_LABEL"),true);
  setDefaultCloseOperation(javax.swing.JFrame.DISPOSE_ON_CLOSE);
  getContentPane().setLayout(new BorderLayout(0,0));
  topPanel.setLayout(new FlowLayout(FlowLayout.LEFT,5,5));
  titleLabel.setText("Visualisation des donn?s : " + fieldLabelTable.getNumberOfFirstRow() + "  "+ fieldLabelTable.getNumberOfLastRow()+ " sur "+ fieldLabelTable.getNumberOfRows()+ " enregistrements");
  titleLabel.setFont(new Font("Dialog",Font.BOLD,12));
  topPanel.add(titleLabel);
  fieldLabelTable.getModel().addTableModelListener(new TableModelListener(){
    /** 
 * DOCUMENT ME!
 * @param evt Description of Parameter
 */
    public void tableChanged(    javax.swing.event.TableModelEvent evt){
      titleLabel.setText("Visualisation des donn?s : " + fieldLabelTable.getNumberOfFirstRow() + "  "+ fieldLabelTable.getNumberOfLastRow()+ " sur "+ fieldLabelTable.getNumberOfRows()+ " enregistrements");
    }
  }
);
  tableScrollPane.setBorder(BorderFactory.createEtchedBorder());
  fieldLabelTable.setAutoResizeMode(JTable.AUTO_RESIZE_ALL_COLUMNS);
  tableScrollPane.getViewport().add(fieldLabelTable);
  bottomToolBar=new PersistentToolBar(gexPane,fieldLabelTable,this,"net.codjo.gui");
  getContentPane().add(topPanel,BorderLayout.NORTH);
  getContentPane().add(tableScrollPane,BorderLayout.CENTER);
  getContentPane().add(bottomToolBar,BorderLayout.SOUTH);
  setSize(726,550);
}
 

Example 23

From project contribution_eevolution_smart_browser, under directory /client/src/org/compiere/apps/.

Source file: APanel.java

  16 
vote

/** 
 * Initializes the state of this instance.
 * @throws Exception
 */
private void jbInit() throws Exception {
  this.setLocale(Language.getLoginLanguage().getLocale());
  this.setLayout(mainLayout);
  mainLayout.setHgap(2);
  mainLayout.setVgap(2);
  if (isNested)   this.add(m_curGC,BorderLayout.CENTER);
 else {
    CPanel dummy=new CPanel();
    dummy.setLayout(new BorderLayout());
    dummy.setBorder(BorderFactory.createEmptyBorder(0,0,0,2));
    dummy.add(tabPanel,BorderLayout.CENTER);
    this.add(dummy,BorderLayout.CENTER);
  }
  this.add(statusBar,BorderLayout.SOUTH);
  this.add(northPanel,BorderLayout.NORTH);
  northPanel.setLayout(northLayout);
  northLayout.setAlignment(FlowLayout.LEFT);
  toolBar.putClientProperty("JToolBar.isRollover",Boolean.TRUE);
  toolBar.setBorderPainted(false);
  toolBar.setFloatable(false);
  northPanel.add(toolBar,null);
}
 

Example 24

From project cytoscape-plugins, under directory /org.openbel.cytoscape.navigator/src/org/openbel/cytoscape/navigator/dialog/.

Source file: SearchKamDialog.java

  16 
vote

private void initUI(){
  getContentPane().setLayout(new BorderLayout());
  getContentPane().add(createSearchKAMPanel(),BorderLayout.CENTER);
  getContentPane().add(createButtonPanel(),BorderLayout.SOUTH);
  if (functionCmb.getModel().getSize() > 0) {
    functionCmb.setSelectedIndex(0);
    searchBtn.setEnabled(true);
  }
 else {
    searchBtn.setEnabled(false);
  }
  addBtn.setEnabled(false);
  final Dimension dialogDim=new Dimension(400,600);
  setMinimumSize(dialogDim);
  setSize(dialogDim);
  setPreferredSize(dialogDim);
  setLocationRelativeTo(null);
  setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
  pack();
}
 

Example 25

From project dawn-isencia, under directory /com.isencia.passerelle.commons/src/main/java/com/isencia/util/swing/calendar/.

Source file: DateSelector.java

  16 
vote

public void init(){
  setLayout(new BorderLayout());
  calendarPanel=new JCalendar();
  btnDateVisible=new javax.swing.JButton();
  txtDateField=new javax.swing.JTextField();
  txtDateField.setEditable(false);
  setLayout(new AbsoluteLayout());
  btnDateVisible.setText("...");
  btnDateVisible.addActionListener(new java.awt.event.ActionListener(){
    public void actionPerformed(    java.awt.event.ActionEvent evt){
      setPanelVisibility(evt);
    }
  }
);
  add(btnDateVisible,new AbsoluteConstraints(110,0,30,20));
  add(txtDateField,new AbsoluteConstraints(0,0,110,20));
  calendarPanel.addPropertyChangeListener(this);
  calendarPanel.setBorder(new LineBorder(Color.black));
  formatter=new SimpleDateFormat("dd/MM/yyyy");
  popup=new JPopupMenu();
}
 

Example 26

From project enclojure, under directory /netbeans/plugins/org-enclojure-plugin/src/main/java/org/enclojure/ide/debugger/watchesFiltering/.

Source file: WatchPanel.java

  16 
vote

public JComponent getPanel(){
  if (panel != null)   return panel;
  panel=new JPanel();
  ResourceBundle bundle=NbBundle.getBundle(WatchPanel.class);
  panel.getAccessibleContext().setAccessibleDescription(bundle.getString("ACSD_WatchPanel"));
  JLabel textLabel=new JLabel(bundle.getString("CTL_Watch_Name"));
  textLabel.setBorder(new EmptyBorder(0,0,0,10));
  panel.setLayout(new BorderLayout());
  panel.setBorder(new EmptyBorder(11,12,1,11));
  panel.add("West",textLabel);
  panel.add("Center",textField=new JTextField(25));
  textField.getAccessibleContext().setAccessibleDescription(bundle.getString("ACSD_CTL_Watch_Name"));
  textField.setBorder(new CompoundBorder(textField.getBorder(),new EmptyBorder(2,0,2,0)));
  textLabel.setDisplayedMnemonic(bundle.getString("CTL_Watch_Name_Mnemonic").charAt(0));
  textField.setText(expression);
  textField.selectAll();
  textLabel.setLabelFor(textField);
  textField.requestFocus();
  return panel;
}
 

Example 27

From project encog-java-core, under directory /src/main/java/org/encog/platformspecific/j2se/.

Source file: TrainingDialog.java

  16 
vote

/** 
 * Construct the training dialog.
 */
public TrainingDialog(){
  this.setSize(320,100);
  setTitle("Training");
  final Container content=getContentPane();
  content.setLayout(new BorderLayout());
  final JPanel statsPanel=new JPanel();
  statsPanel.setLayout(new GridLayout(3,2));
  statsPanel.add(new JLabel("Current Error:"));
  statsPanel.add(this.labelError=new JLabel("Starting..."));
  statsPanel.add(new JLabel("Iterations:"));
  statsPanel.add(this.labelIterations=new JLabel(""));
  statsPanel.add(new JLabel("Training Time:"));
  statsPanel.add(this.labelTime=new JLabel(""));
  content.add(this.buttonStop=new JButton("Stop"),BorderLayout.SOUTH);
  content.add(statsPanel,BorderLayout.CENTER);
  this.buttonStop.addActionListener(this);
}
 

Example 28

From project encog-java-examples, under directory /src/main/java/org/encog/examples/gui/elementary/.

Source file: ElementaryExample.java

  16 
vote

public ElementaryExample(){
  setSize(500,500);
  setTitle("Elementary CA");
  Container c=getContentPane();
  c.setLayout(new BorderLayout());
  JPanel buttonPanel=new JPanel();
  buttonPanel.setLayout(new FlowLayout(FlowLayout.LEFT));
  c.add(buttonPanel,BorderLayout.NORTH);
  c.add(this.status=new JLabel(),BorderLayout.SOUTH);
  buttonPanel.add(new JLabel("Rule:"));
  buttonPanel.add(this.ruleText=new JTextField("110"));
  buttonPanel.add(new JLabel("Size:"));
  buttonPanel.add(this.sizeText=new JTextField("500"));
  buttonPanel.add(generateButton=new JButton("Generate"));
  this.worldArea=new DisplayPanel();
  this.scroll=new JScrollPane(this.worldArea);
  c.add(this.scroll,BorderLayout.CENTER);
  generateButton.addActionListener(this);
  String[] test={"1x","2x","3x","5x","10x"};
  this.zoomCombo=new JComboBox(test);
  buttonPanel.add(new JLabel("Zoom:"));
  buttonPanel.add(zoomCombo);
  zoomCombo.addItemListener(this);
  this.addWindowListener(this);
}
 

Example 29

From project beam-meris-icol, under directory /src/main/java/org/esa/beam/meris/icol/ui/.

Source file: IcolForm.java

  15 
vote

private JPanel createMerisCloudPanel(){
  JPanel panel=cloudProductSelector.createDefaultPanel();
  panel.setBorder(BorderFactory.createTitledBorder("Cloud Mask"));
  final JTextField textField=new JTextField(30);
  final Binding binding=bc.bind("cloudMaskExpression",textField);
  final JPanel subPanel=new JPanel(new BorderLayout(2,2));
  subPanel.add(new JLabel("Mask expression:"),BorderLayout.NORTH);
  subPanel.add(textField,BorderLayout.CENTER);
  final JButton etcButton=new JButton("...");
  etcButton.addActionListener(new ActionListener(){
    @Override public void actionPerformed(    ActionEvent e){
      ProductExpressionPane expressionPane;
      Product currentProduct=cloudProductSelector.getSelectedProduct();
      expressionPane=ProductExpressionPane.createBooleanExpressionPane(new Product[]{currentProduct},currentProduct,appContext.getPreferences());
      expressionPane.setCode((String)binding.getPropertyValue());
      if (expressionPane.showModalDialog(null,"Expression Editor") == ModalDialog.ID_OK) {
        binding.setPropertyValue(expressionPane.getCode());
      }
    }
  }
);
  cloudProductSelector.addSelectionChangeListener(new AbstractSelectionChangeListener(){
    @Override public void selectionChanged(    SelectionChangeEvent event){
      updateMerisCloudMaskExpressionEditor(textField,etcButton);
    }
  }
);
  updateMerisCloudMaskExpressionEditor(textField,etcButton);
  subPanel.add(etcButton,BorderLayout.EAST);
  panel.add(subPanel);
  return panel;
}
 

Example 30

From project BoneJ, under directory /src/org/bonej/.

Source file: Help.java

  15 
vote

private void showAbout(){
  JEditorPane htmlPane=new JEditorPane("text/html","<html>\n" + "  <body>\n" + "<p><b>BoneJ version " + bonejVersion + "</b>	</p>"+ "<p>BoneJ is an ImageJ plugin designed for (but not limited to) bone image analysis.</p>"+ "<p>User and developer documentation can be found at <a href=http://bonej.org/>bonej.org</a></p>"+ "\n"+ "  </body>\n"+ "</html>");
  htmlPane.setEditable(false);
  htmlPane.setOpaque(false);
  htmlPane.addHyperlinkListener(new HyperlinkListener(){
    public void hyperlinkUpdate(    HyperlinkEvent e){
      if (HyperlinkEvent.EventType.ACTIVATED.equals(e.getEventType()))       try {
        BrowserLauncher.openURL(e.getURL().toString());
      }
 catch (      IOException exception) {
      }
    }
  }
);
  JPanel panel=new JPanel(new BorderLayout());
  panel.add(htmlPane,BorderLayout.CENTER);
  final JFrame frame=new JFrame("About BoneJ...");
  frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
  frame.getContentPane().add(panel,BorderLayout.CENTER);
  frame.pack();
  frame.setVisible(true);
}
 

Example 31

From project CBCJVM, under directory /cbc/CBCJVM/src/cbccore/low/.

Source file: CBCSimulator.java

  15 
vote

public CBCSimulator(){
  try {
    UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
  }
 catch (  Exception e) {
    System.out.println("Error setting native LAF: " + e);
  }
  cbob=new SimulatedCBOB(this);
  sound=new SimulatedSound(this);
  sensor=new SimulatedSensor(this);
  device=new SimulatedDevice(this);
  display=new SimulatedDisplay(this);
  input=new SimulatedInput(this);
  servo=new SimulatedServo(this);
  motor=new SimulatedMotor(this);
  camera=new SimulatedCamera(this);
  create=new SimulatedCreate(this);
  for (int i=0; i < motorSpeedLabels.length; ++i) {
    motorSpeedLabels[i]=new JLabel();
  }
  if (stdOut == null) {
    stdOut=System.out;
  }
  System.out.println("Welcome to CBCJava");
  frame.getContentPane().add(new JScrollPane(display.getTextBox()),BorderLayout.CENTER);
  System.setOut(display.getPrintStream());
  addSidebar();
  addMotorLabels();
  addButtons();
  frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  Dimension screenSize=Toolkit.getDefaultToolkit().getScreenSize();
  frame.setSize(Math.min(1024,(int)(screenSize.width * .7)),Math.min(768,(int)(screenSize.height * .7)));
  frame.setVisible(true);
  new MotorSpeedUpdater(this,100).start();
}
 

Example 32

From project charts4j, under directory /src/test/java/com/googlecode/charts4j/example/.

Source file: SwingExample.java

  15 
vote

/** 
 * Display the chart in a swing window.
 * @param urlString the url string to display.
 * @throws IOException
 */
private static void displayUrlString(final String urlString) throws IOException {
  JFrame frame=new JFrame();
  JLabel label=new JLabel(new ImageIcon(ImageIO.read(new URL(urlString))));
  frame.getContentPane().add(label,BorderLayout.CENTER);
  frame.pack();
  frame.setVisible(true);
}
 

Example 33

From project ChkBugReport, under directory /src/com/sonyericsson/chkbugreport/.

Source file: Gui.java

  15 
vote

public Gui(Main main){
  super("ChkBugReport - (C) 2012 Sony-Ericsson");
  mMain=main;
  JTabbedPane tabs=new JTabbedPane();
  setContentPane(tabs);
  JPanel runPanel=new JPanel(new BorderLayout());
  tabs.addTab("Run",runPanel);
  JPanel runTB=new JPanel();
  runPanel.add(runTB,BorderLayout.NORTH);
  mBtnAdb=new JButton("Fetch from device");
  mBtnAdb.setEnabled(false);
  runTB.add(mBtnAdb);
  mDropArea=new JLabel("Drop a bugreport file here!",JLabel.CENTER);
  runPanel.add(mDropArea,BorderLayout.CENTER);
  mDropArea.setBorder(BorderFactory.createLoweredBevelBorder());
  mDropArea.setTransferHandler(new MyTransferHandler());
  mStatus=new JLabel("Ready.");
  runPanel.add(mStatus,BorderLayout.SOUTH);
  mAdbExt=mMain.findExtension("AdbExtension");
  if (mAdbExt != null) {
    mBtnAdb.setEnabled(true);
    mBtnAdb.addActionListener(this);
  }
  JPanel settingsPanel=new JPanel();
  settingsPanel.setLayout(new BoxLayout(settingsPanel,BoxLayout.Y_AXIS));
  tabs.addTab("Settings",settingsPanel);
  buildSettings(settingsPanel);
  setSize(640,480);
  setDefaultCloseOperation(EXIT_ON_CLOSE);
  setLocationRelativeTo(null);
}
 

Example 34

From project codjo-imports, under directory /codjo-imports-gui/src/main/java/net/codjo/imports/gui/.

Source file: FieldImportDetailWindow.java

  15 
vote

public FieldImportDetailWindow(DetailDataSource dataSource,Row selectedFileRow) throws RequestException {
  super("Description d'une colonne",true,false,true,true);
  this.dataSource=dataSource;
  this.getContentPane().add(mainPanel,BorderLayout.CENTER);
  ButtonPanelLogic buttonPanelLogic=new ButtonPanelLogic();
  this.getContentPane().add(buttonPanelLogic.getGui(),BorderLayout.SOUTH);
  TableStructure currentStructure=getCurrentTableStructure(selectedFileRow);
  NumberField positionField=buildIntegerField();
  addField("position",positionLabel,positionField);
  addField("length",lengthLabel,buildIntegerField());
  StructureCombo combo=new StructureCombo(currentStructure.getFieldsBySqlKey());
  addField("dbDestinationFieldName",destinationFieldNameLabel,combo);
  JComboBox comboBox=new JComboBox(new Object[]{FieldType.STRING_FIELD,FieldType.NUMERIC_FIELD,FieldType.DATE_FIELD,FieldType.CLASS_FIELD,FieldType.BOOLEAN_FIELD});
  comboBox.setRenderer(new FieldTypeRenderer());
  addField("destinationFieldType",destinationFieldTypeLabel,comboBox);
  addField("removeLeftZeros",removeLeftZerosLabel,new JCheckBox());
  addField("expression",expressionLabel,new JTextArea(3,20));
  dataSource.declare("importSettingsId",new NumberField());
  dataSource.setFieldValue("importSettingsId",selectedFileRow.getFieldValue("importSettingsId"));
  dataSource.load();
  buttonPanelLogic.setMainDataSource(dataSource);
  boolean updateMode=dataSource.getLoadFactory() != null;
  positionField.setEnabled(!updateMode);
  translationNotifier=InternationalizationUtil.retrieveTranslationNotifier(dataSource.getGuiContext());
  translationNotifier.addInternationalizableContainer(this);
}
 

Example 35

From project cowgraph, under directory /CowGraph/CowGraphVisualEditor/src/zbeans/cowgraph/visual/editor/.

Source file: CowGraphVisualEditorTopComponent.java

  15 
vote

public CowGraphVisualEditorTopComponent(){
  initComponents();
  setDisplayName("...");
  scene=new CowGraphVisualEditorScene();
  view=scene.createView();
  canvasScrollPane.setViewportView(view);
  add(scene.createSatelliteView(),BorderLayout.WEST);
  content=new InstanceContent();
  saveCookie=new SaveCookieImpl();
  content.add(PaletteSupport.createPalette());
  associateLookup(new AbstractLookup(content));
}
 

Example 36

From project drugis-common, under directory /common-gui/src/main/java/org/drugis/common/gui/.

Source file: BuildViewWhenReadyComponent.java

  15 
vote

private void buildWaitingView(){
  Runnable worker=new Runnable(){
    public void run(){
      setVisible(false);
      removeAll();
      JLabel spinner=new JLabel(GUIHelper.IMAGELOADER.getIcon(ICON_LOADING_LARGE));
      JLabel label=new JLabel(d_message);
      JPanel nested=new JPanel(new BorderLayout());
      nested.add(spinner,BorderLayout.CENTER);
      nested.add(label,BorderLayout.SOUTH);
      add(nested);
      setVisible(true);
    }
  }
;
  SwingUtilities.invokeLater(worker);
}