List of usage examples for javax.swing JSplitPane setBorder
@BeanProperty(preferred = true, visualUpdate = true, description = "The component's border.") public void setBorder(Border border)
From source file:org.openconcerto.erp.core.finance.accounting.ui.PlanComptableGPanel.java
private void uiInit() { this.setLayout(new GridBagLayout()); final GridBagConstraints c = new DefaultGridBagConstraints(); this.setOpaque(false); this.panelCompte.setOpaque(false); this.panelInfosCompte.setOpaque(false); this.panelDetails.setOpaque(false); this.panelCompte.setLayout(new GridBagLayout()); this.panelInfosCompte.setLayout(new GridBagLayout()); this.panelDetails.setLayout(new GridBagLayout()); /******************************************************************************************* * * RadioButton Selection du mode d'affichage du PCG abrege, base ou developp Panel * Details// ww w .j a v a 2s. com ******************************************************************************************/ this.panelDetails.add(this.radioCompteBase, c); this.radioCompteBase.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { updateCompteTable(); } }); c.gridy++; this.panelDetails.add(this.radioCompteAbrege, c); this.radioCompteAbrege.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { updateCompteTable(); } }); c.gridy++; this.panelDetails.add(this.radioCompteDeveloppe, c); this.radioCompteDeveloppe.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { updateCompteTable(); } }); ButtonGroup grp1 = new ButtonGroup(); grp1.add(this.radioCompteBase); grp1.add(this.radioCompteAbrege); grp1.add(this.radioCompteDeveloppe); this.radioCompteBase.setSelected(true); /******************************************************************************************* * ** Panel Compte ******************************************************************************************/ c.insets = new Insets(2, 2, 1, 2); c.fill = GridBagConstraints.HORIZONTAL; c.anchor = GridBagConstraints.NORTHWEST; c.gridx = 0; c.gridy = 0; c.gridwidth = 1; c.gridheight = 1; c.weightx = 0; c.weighty = 0; this.panelDetails.setBorder(BorderFactory.createTitledBorder("Dtails")); this.panelCompte.add(this.panelDetails, c); /******************************************************************************************* * * Affichage du plan comptable ******************************************************************************************/ SQLBase base = ((ComptaPropsConfiguration) Configuration.getInstance()).getSQLBaseSociete(); SQLTable classeCompteTable = base.getTable("CLASSE_COMPTE"); SQLSelect selClasse = new SQLSelect(base); selClasse.addSelect(classeCompteTable.getField("ID")); selClasse.addSelect(classeCompteTable.getField("NOM")); selClasse.addSelect(classeCompteTable.getField("TYPE_NUMERO_COMPTE")); selClasse.addRawOrder("\"CLASSE_COMPTE\".\"TYPE_NUMERO_COMPTE\""); String reqClasse = selClasse.asString(); Object obClasse = base.getDataSource().execute(reqClasse, new ArrayListHandler()); List myListClasse = (List) obClasse; if (myListClasse.size() != 0) { for (int k = 0; k < myListClasse.size(); k++) { Object[] objTmp = (Object[]) myListClasse.get(k); ClasseCompte ccTmp = new ClasseCompte(Integer.parseInt(objTmp[0].toString()), objTmp[1].toString(), objTmp[2].toString()); this.classeComptes.add(ccTmp); JTable tab = creerJTable(ccTmp); this.tables.add(tab); this.tabbedClasse.add(ccTmp.getNom(), new JScrollPane(tab)); } } c.gridwidth = 4; c.gridheight = 6; c.fill = GridBagConstraints.BOTH; c.weightx = 1; c.weighty = 1; c.gridx++; c.gridy = 0; this.panelCompte.add(this.tabbedClasse, c); /******************************************************************************************* * * Informations sur le compte selectionn Panel Infos Compte ******************************************************************************************/ c.gridwidth = GridBagConstraints.REMAINDER; c.fill = GridBagConstraints.HORIZONTAL; c.gridheight = 1; c.gridwidth = GridBagConstraints.REMAINDER; c.weightx = 1; c.weighty = 0; c.gridy = 0; c.gridx = 0; TitledSeparator sep = new TitledSeparator("Informations sur le compte"); this.panelInfosCompte.add(sep, c); GridBagConstraints cInfos = new GridBagConstraints(); cInfos.insets = new Insets(0, 0, 0, 0); cInfos.fill = GridBagConstraints.BOTH; cInfos.anchor = GridBagConstraints.NORTHWEST; cInfos.gridx = 0; cInfos.gridy = 0; cInfos.gridwidth = 1; cInfos.gridheight = 1; cInfos.weightx = 1; cInfos.weighty = 1; this.textInfos.setFont(this.getFont()); this.textInfos.setEditable(false); JPanel infos = new JPanel(new GridBagLayout()); infos.add(this.textInfos, cInfos); JScrollPane scrollInfos = new JScrollPane(infos); c.insets = new Insets(0, 0, 0, 0); c.gridx = 0; c.gridy++; c.weightx = 1; c.weighty = 1; c.fill = GridBagConstraints.BOTH; c.gridwidth = GridBagConstraints.REMAINDER; c.gridheight = GridBagConstraints.REMAINDER; this.panelInfosCompte.add(scrollInfos, c); this.panelInfosCompte.setMinimumSize(new Dimension(100, 80)); JSplitPane split = new JSplitPane(JSplitPane.VERTICAL_SPLIT, this.panelCompte, this.panelInfosCompte); split.setBorder(null); this.add(split, c); }
From source file:org.optaconf.benchmark.examples.common.swingui.SolverAndPersistenceFrame.java
private JComponent createQuickOpenPanel() { JPanel quickOpenPanel = new JPanel(new BorderLayout()); JLabel quickOpenLabel = new JLabel("Quick open"); quickOpenLabel.setBorder(BorderFactory.createEmptyBorder(2, 2, 2, 2)); quickOpenPanel.add(quickOpenLabel, BorderLayout.NORTH); JSplitPane splitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT, createQuickOpenUnsolvedPanel(), createQuickOpenSolvedPanel()); splitPane.setResizeWeight(0.8);/*from w ww . j a v a 2s . c om*/ splitPane.setBorder(null); quickOpenPanel.add(splitPane, BorderLayout.CENTER); return quickOpenPanel; }
From source file:org.optaplanner.mes.common.swingui.SolverAndPersistenceFrame.java
@SuppressWarnings("unused") private JComponent createQuickOpenPanel() { JPanel quickOpenPanel = new JPanel(new BorderLayout()); quickOpenPanel.add(new JLabel("Quick open"), BorderLayout.NORTH); JSplitPane splitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT, createQuickOpenUnsolvedPanel(), createQuickOpenSolvedPanel()); splitPane.setResizeWeight(0.8);/*from ww w . ja v a 2 s.c o m*/ splitPane.setBorder(null); quickOpenPanel.add(splitPane, BorderLayout.CENTER); return quickOpenPanel; }
From source file:org.optaplanner.mes.common.swingui.SolverAndPersistenceFrame.java
private JComponent createQuickOpenScorePanel() { createQuickOpenUnsolvedPanel();//w ww . j a v a 2 s . c o m JPanel panel = new JPanel(new BorderLayout()); JSplitPane splitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT, createQuickOpenSolvedPanel(), createScoreFieldPanel()); splitPane.setResizeWeight(0.8); splitPane.setBorder(null); panel.add(splitPane, BorderLayout.CENTER); return panel; }
From source file:org.sintef.thingml.ThingMLFrame.java
public ThingMLFrame(String args[]) { int i = 0;// w ww .jav a 2 s. c o m for (String s : args) { if (i > 0) { argsFlat += "="; } argsFlat += s; } if (argsFlat.contains("-open=")) { File filePath = new File(argsFlat.substring(argsFlat.indexOf("=") + 1)); filePanel = new FilePanel(editor, this, filePath.getParentFile()); String content = ""; try { final InputStream input = new FileInputStream(filePath); final java.util.List<String> packLines = IOUtils.readLines(input); for (String line : packLines) { content += line + "\n"; } input.close(); } catch (Exception ex) { ex.printStackTrace(); } editor.loadText(content, null); } else { filePanel = new FilePanel(editor, this, null); } setTitle("ThingML Editor"); this.setLayout(new BorderLayout()); filePanel.setPreferredSize(new Dimension(300, 300)); filePanel.setSize(300, 300); JSplitPane splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, filePanel, editor); splitPane.setContinuousLayout(true); splitPane.setDividerSize(6); splitPane.setDividerLocation(200); splitPane.setResizeWeight(0.0); splitPane.setBorder(null); add(splitPane, BorderLayout.CENTER); }
From source file:phex.gui.tabs.library.LibraryTab.java
public void initComponent(XJBGUISettings guiSettings) { CellConstraints cc = new CellConstraints(); FormLayout tabLayout = new FormLayout("2dlu, fill:d:grow, 2dlu", // columns "2dlu, fill:p:grow, 2dlu"); //rows PanelBuilder tabBuilder = new PanelBuilder(tabLayout, this); JPanel contentPanel = new JPanel(); FWElegantPanel elegantPanel = new FWElegantPanel(Localizer.getString("Library"), contentPanel); tabBuilder.add(elegantPanel, cc.xy(2, 2)); FormLayout contentLayout = new FormLayout("fill:d:grow", // columns "fill:d:grow"); //rows PanelBuilder contentBuilder = new PanelBuilder(contentLayout, contentPanel); MouseHandler mouseHandler = new MouseHandler(); JPanel treePanel = createTreePanel(mouseHandler); JPanel tablePanel = createTablePanel(guiSettings, mouseHandler); JSplitPane splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, treePanel, tablePanel); splitPane.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); splitPane.setDividerSize(4);// w w w . jav a 2 s . c o m splitPane.setOneTouchExpandable(false); contentBuilder.add(splitPane, cc.xy(1, 1)); sharedFilesLabel = new JLabel(" "); sharedFilesLabel.setHorizontalAlignment(JLabel.RIGHT); elegantPanel.addHeaderPanelComponent(sharedFilesLabel, BorderLayout.EAST); ShareManager.getInstance().getSharedFilesService() .addSharedFilesChangeListener(new SharedFilesChangeHandler()); fileTreePopup = new FWPopupMenu(); fileTablePopup = new FWPopupMenu(); FWAction action; action = getTabAction(ADD_SHARE_FOLDER_ACTION_KEY); fileTreePopup.addAction(action); action = getTabAction(REMOVE_SHARE_FOLDER_ACTION_KEY); fileTreePopup.addAction(action); if (SystemUtils.IS_OS_WINDOWS || SystemUtils.IS_OS_MAC_OSX) { action = getTabAction(EXPLORE_FOLDER_ACTION_KEY); fileTreePopup.addAction(action); } action = getTabAction(OPEN_FILE_ACTION_KEY); fileTablePopup.addAction(action); action = getTabAction(VIEW_BITZI_ACTION_KEY); fileTablePopup.addAction(action); fileTablePopup.addSeparator(); fileTreePopup.addSeparator(); action = getTabAction(RESCAN_ACTION_KEY); fileTablePopup.addAction(action); fileTreePopup.addAction(action); action = getTabAction(EXPORT_ACTION_KEY); fileTablePopup.addAction(action); fileTreePopup.addAction(action); action = getTabAction(FILTER_ACTION_KEY); fileTablePopup.addAction(action); fileTreePopup.addAction(action); }
From source file:tk.tomby.tedit.core.Workspace.java
private JSplitPane createSplitPane(int orientation, Component left, Component right) { JSplitPane split = new StrippedSplitPane(orientation, left, right); split.setBorder(BorderFactory.createEmptyBorder()); split.setDividerSize(5);//from w w w .j a v a 2 s .c o m split.setOneTouchExpandable(false); return split; }