Java Code Examples for javax.swing.border.TitledBorder#LEFT
The following examples show how to use
javax.swing.border.TitledBorder#LEFT .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DatabaseView.java From hortonmachine with GNU General Public License v3.0 | 6 votes |
public JPanel createdatabaseTreeView() { _databaseTreeView.setName("databaseTreeView"); TitledBorder titledborder1 = new TitledBorder(null,"Database Connection",TitledBorder.LEFT,TitledBorder.DEFAULT_POSITION,null,new Color(33,33,33)); _databaseTreeView.setBorder(titledborder1); FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:GROW(1.0)","FILL:DEFAULT:GROW(1.0)"); CellConstraints cc = new CellConstraints(); _databaseTreeView.setLayout(formlayout1); _databaseTree.setName("databaseTree"); JScrollPane jscrollpane1 = new JScrollPane(); jscrollpane1.setViewportView(_databaseTree); jscrollpane1.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED); jscrollpane1.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED); _databaseTreeView.add(jscrollpane1,new CellConstraints(1,1,1,1,CellConstraints.FILL,CellConstraints.FILL)); addFillComponents(_databaseTreeView,new int[0],new int[0]); return _databaseTreeView; }
Example 2
Source File: GeopaparazziView.java From hortonmachine with GNU General Public License v3.0 | 6 votes |
public JPanel createdatabaseTreeView() { _databaseTreeView.setName("databaseTreeView"); TitledBorder titledborder1 = new TitledBorder(null,"Projects",TitledBorder.LEFT,TitledBorder.DEFAULT_POSITION,null,new Color(33,33,33)); _databaseTreeView.setBorder(titledborder1); FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:GROW(1.0)","FILL:DEFAULT:GROW(1.0)"); CellConstraints cc = new CellConstraints(); _databaseTreeView.setLayout(formlayout1); _databaseTree.setName("databaseTree"); JScrollPane jscrollpane1 = new JScrollPane(); jscrollpane1.setViewportView(_databaseTree); jscrollpane1.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED); jscrollpane1.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED); _databaseTreeView.add(jscrollpane1,new CellConstraints(1,1,1,1,CellConstraints.FILL,CellConstraints.FILL)); addFillComponents(_databaseTreeView,new int[0],new int[0]); return _databaseTreeView; }
Example 3
Source File: TitledBorderBeanInfo.java From netbeans with Apache License 2.0 | 5 votes |
public JustificationPropertyEditor() { super( new int[] { TitledBorder.DEFAULT_JUSTIFICATION, TitledBorder.LEFT, TitledBorder.CENTER, TitledBorder.RIGHT, TitledBorder.LEADING, TitledBorder.TRAILING, }, new String[] { "javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION", // NOI18N "javax.swing.border.TitledBorder.LEFT", // NOI18N "javax.swing.border.TitledBorder.CENTER", // NOI18N "javax.swing.border.TitledBorder.RIGHT", // NOI18N "javax.swing.border.TitledBorder.LEADING", // NOI18N "javax.swing.border.TitledBorder.TRAILING", // NOI18N }, new String[] { "VALUE_JustDefault", // NOI18N "VALUE_JustLeft", // NOI18N "VALUE_JustCenter", // NOI18N "VALUE_JustRight", // NOI18N "VALUE_JustLeading", // NOI18N "VALUE_JustTrailing", // NOI18N } ); }
Example 4
Source File: BotConfigDialog.java From megamek with GNU General Public License v2.0 | 5 votes |
private JPanel selectPlayerToReplacePanel() { JPanel panel = new JPanel(); panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS)); String title = Messages.getString("BotConfigDialog.replacePlayerLabel") + " "; TitledBorder border = new TitledBorder(new LineBorder(Color.black, 1), Messages.getString("BotConfigDialog.replacePlayerLabel"), TitledBorder.LEFT, TitledBorder.DEFAULT_POSITION); panel.setBorder(border); String longestEntry = title; Vector<String> playerList = new Vector<>(ghostPlayers.size()); for (IPlayer p : ghostPlayers) { playerList.add(p.getName()); if (p.getName().length() > longestEntry.length()) { longestEntry = p.getName() + " "; } } playersToReplace = new JList<>(playerList); int minWidth = (int) playersToReplace .getFontMetrics(playersToReplace.getFont()) .getStringBounds(longestEntry, null).getWidth(); playersToReplace.setSelectedIndex(0); playersToReplace.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION); playersToReplace.setPreferredSize(new Dimension(minWidth, playersToReplace.getPreferredSize().height)); panel.add(playersToReplace); panel.add(Box.createVerticalGlue()); return panel; }
Example 5
Source File: DatabaseView.java From hortonmachine with GNU General Public License v3.0 | 5 votes |
public JPanel createPanel1() { JPanel jpanel1 = new JPanel(); TitledBorder titledborder1 = new TitledBorder(null,"SQL Editor",TitledBorder.LEFT,TitledBorder.DEFAULT_POSITION,null,new Color(33,33,33)); jpanel1.setBorder(titledborder1); FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:NONE,FILL:DEFAULT:GROW(1.0)","CENTER:2DLU:NONE,FILL:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,FILL:2DLU:GROW(1.0)"); CellConstraints cc = new CellConstraints(); jpanel1.setLayout(formlayout1); _runQueryButton.setActionCommand("1"); _runQueryButton.setName("runQueryButton"); _runQueryButton.setText("1"); jpanel1.add(_runQueryButton,cc.xy(1,2)); _runQueryAndStoreButton.setActionCommand("2"); _runQueryAndStoreButton.setName("runQueryAndStoreButton"); _runQueryAndStoreButton.setText("2"); jpanel1.add(_runQueryAndStoreButton,cc.xy(1,4)); _runQueryAndStoreShapefileButton.setActionCommand("3"); _runQueryAndStoreShapefileButton.setName("runQueryAndStoreShapefileButton"); _runQueryAndStoreShapefileButton.setText("3"); jpanel1.add(_runQueryAndStoreShapefileButton,cc.xy(1,6)); _clearSqlEditorbutton.setActionCommand("4"); _clearSqlEditorbutton.setName("clearSqlEditorbutton"); _clearSqlEditorbutton.setText("5"); jpanel1.add(_clearSqlEditorbutton,cc.xy(1,10)); _viewQueryButton.setActionCommand("4"); _viewQueryButton.setName("viewQueryButton"); _viewQueryButton.setText("4"); jpanel1.add(_viewQueryButton,cc.xy(1,8)); _sqlEditorAreaPanel.setName("sqlEditorAreaPanel"); jpanel1.add(_sqlEditorAreaPanel,cc.xywh(2,2,1,10)); addFillComponents(jpanel1,new int[]{ 1,2 },new int[]{ 1,3,5,7,9,11 }); return jpanel1; }
Example 6
Source File: InlineComponentTitledPanel.java From ghidra with Apache License 2.0 | 2 votes |
/** * Create a panel with <code>titleComponent</code> in the top, left corner * @param titleComponent widget to draw in the border */ public InlineComponentTitledPanel(JComponent titleComponent) { this(titleComponent, TitledBorder.LEFT, TitledBorder.TOP); }
Example 7
Source File: InlineComponentTitledPanel.java From ghidra with Apache License 2.0 | 2 votes |
/** * Create a panel with <code>titleComponent</code> in the top, left corner * @param titleComponent widget to draw in the border * @param otherBorder secondary border to place around this panel */ public InlineComponentTitledPanel(JComponent titleComponent, Border otherBorder) { this(titleComponent, TitledBorder.LEFT, TitledBorder.TOP, otherBorder); }