Java Code Examples for java.awt.GridBagConstraints#NORTH
The following examples show how to use
java.awt.GridBagConstraints#NORTH .
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: SwingTools.java From rapidminer-studio with GNU Affero General Public License v3.0 | 6 votes |
/** * Creates a helpLabel and adds it to the labelPanel. The helpLabel shows a help icon. * * @param labelPanel * the panel which will be used to add the label. The panel needs to have a * {@link BorderLayout} as layout manager as the label will be added with the * constraint {@link BorderLayout#EAST}. * @return the helpLabel for further use * @since 7.0.0 */ public static JLabel initializeHelpLabel(JPanel labelPanel) { JPanel helpPanel = new JPanel(); helpPanel.setLayout(new GridBagLayout()); GridBagConstraints gbc = new GridBagConstraints(); gbc.anchor = GridBagConstraints.NORTH; gbc.weightx = 1.0; gbc.fill = GridBagConstraints.HORIZONTAL; gbc.insets = new Insets(0, 3, 0, 0); final JLabel helpLabel = new JLabel(); helpLabel.setIcon(createIcon(HELP_ICON_PATH)); helpLabel.setFocusable(false); gbc.anchor = GridBagConstraints.CENTER; helpPanel.add(helpLabel, gbc); gbc.gridy += 1; gbc.fill = GridBagConstraints.HORIZONTAL; gbc.weighty = 1.0; gbc.insets = new Insets(0, 0, 0, 0); helpPanel.add(new JLabel(), gbc); labelPanel.add(helpPanel, BorderLayout.EAST); return helpLabel; }
Example 2
Source File: UpdateManagerDialog.java From bigtable-sql with Apache License 2.0 | 6 votes |
private JPanel getLocalUpdateSitePanel() { EmptyBorder border = new EmptyBorder(new Insets(5, 5, 5, 5)); Dimension mediumField = new Dimension(200, 20); JPanel locationPanel = new JPanel(); locationPanel.setBorder(new EmptyBorder(0, 0, 0, 10)); locationPanel.setLayout(new GridBagLayout()); int x = 0; int y = -1; GridBagConstraints c = new GridBagConstraints(); c.gridx = x; c.gridy = y; c.anchor = GridBagConstraints.NORTH; JLabel localUpdatePathLabel = getBorderedLabel(i18n.LOCAL_UPDATE_PATH_LABEL, border); _localUpdatePath = getSizedTextField(mediumField); locationPanel.add(localUpdatePathLabel, getLabelConstraints(c)); locationPanel.add(_localUpdatePath, getFieldFillHorizontalConstaints(c)); return locationPanel; }
Example 3
Source File: java_awt_GridBagConstraints.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
protected GridBagConstraints getObject() { GridBagConstraints gbc = new GridBagConstraints(); gbc.gridx = 1; gbc.gridy = 2; gbc.gridwidth = 3; gbc.gridheight = 4; gbc.weightx = 0.1; gbc.weighty = 0.2; gbc.anchor = GridBagConstraints.NORTH; gbc.fill = GridBagConstraints.VERTICAL; gbc.insets.top = 1; gbc.insets.left = 2; gbc.insets.right = 3; gbc.insets.bottom = 4; gbc.ipadx = -1; gbc.ipady = -2; return gbc; }
Example 4
Source File: BoxTabbedPaneUI.java From pumpernickel with MIT License | 6 votes |
protected GridBagConstraints createCloseButtonConstraints() { GridBagConstraints closeButtonConstraints = new GridBagConstraints(); closeButtonConstraints.gridx = 0; closeButtonConstraints.gridy = 0; closeButtonConstraints.weightx = 1; closeButtonConstraints.weighty = 1; closeButtonConstraints.fill = GridBagConstraints.NONE; if (tabs.getTabPlacement() == SwingConstants.LEFT) { closeButtonConstraints.anchor = GridBagConstraints.SOUTH; } else if (tabs.getTabPlacement() == SwingConstants.RIGHT) { closeButtonConstraints.anchor = GridBagConstraints.NORTH; } else { closeButtonConstraints.anchor = GridBagConstraints.WEST; } if (tabs.getTabPlacement() == SwingConstants.LEFT) { closeButtonConstraints.insets = new Insets(0, 0, 3, 0); } else if (tabs.getTabPlacement() == SwingConstants.RIGHT) { closeButtonConstraints.insets = new Insets(3, 0, 0, 0); } else { closeButtonConstraints.insets = new Insets(0, 3, 0, 0); } return closeButtonConstraints; }
Example 5
Source File: java_awt_GridBagConstraints.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
protected GridBagConstraints getObject() { GridBagConstraints gbc = new GridBagConstraints(); gbc.gridx = 1; gbc.gridy = 2; gbc.gridwidth = 3; gbc.gridheight = 4; gbc.weightx = 0.1; gbc.weighty = 0.2; gbc.anchor = GridBagConstraints.NORTH; gbc.fill = GridBagConstraints.VERTICAL; gbc.insets.top = 1; gbc.insets.left = 2; gbc.insets.right = 3; gbc.insets.bottom = 4; gbc.ipadx = -1; gbc.ipady = -2; return gbc; }
Example 6
Source File: java_awt_GridBagConstraints.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
protected GridBagConstraints getObject() { GridBagConstraints gbc = new GridBagConstraints(); gbc.gridx = 1; gbc.gridy = 2; gbc.gridwidth = 3; gbc.gridheight = 4; gbc.weightx = 0.1; gbc.weighty = 0.2; gbc.anchor = GridBagConstraints.NORTH; gbc.fill = GridBagConstraints.VERTICAL; gbc.insets.top = 1; gbc.insets.left = 2; gbc.insets.right = 3; gbc.insets.bottom = 4; gbc.ipadx = -1; gbc.ipady = -2; return gbc; }
Example 7
Source File: java_awt_GridBagConstraints.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
protected GridBagConstraints getObject() { GridBagConstraints gbc = new GridBagConstraints(); gbc.gridx = 1; gbc.gridy = 2; gbc.gridwidth = 3; gbc.gridheight = 4; gbc.weightx = 0.1; gbc.weighty = 0.2; gbc.anchor = GridBagConstraints.NORTH; gbc.fill = GridBagConstraints.VERTICAL; gbc.insets.top = 1; gbc.insets.left = 2; gbc.insets.right = 3; gbc.insets.bottom = 4; gbc.ipadx = -1; gbc.ipady = -2; return gbc; }
Example 8
Source File: java_awt_GridBagConstraints.java From hottub with GNU General Public License v2.0 | 6 votes |
protected GridBagConstraints getObject() { GridBagConstraints gbc = new GridBagConstraints(); gbc.gridx = 1; gbc.gridy = 2; gbc.gridwidth = 3; gbc.gridheight = 4; gbc.weightx = 0.1; gbc.weighty = 0.2; gbc.anchor = GridBagConstraints.NORTH; gbc.fill = GridBagConstraints.VERTICAL; gbc.insets.top = 1; gbc.insets.left = 2; gbc.insets.right = 3; gbc.insets.bottom = 4; gbc.ipadx = -1; gbc.ipady = -2; return gbc; }
Example 9
Source File: java_awt_GridBagConstraints.java From jdk8u-jdk with GNU General Public License v2.0 | 6 votes |
protected GridBagConstraints getObject() { GridBagConstraints gbc = new GridBagConstraints(); gbc.gridx = 1; gbc.gridy = 2; gbc.gridwidth = 3; gbc.gridheight = 4; gbc.weightx = 0.1; gbc.weighty = 0.2; gbc.anchor = GridBagConstraints.NORTH; gbc.fill = GridBagConstraints.VERTICAL; gbc.insets.top = 1; gbc.insets.left = 2; gbc.insets.right = 3; gbc.insets.bottom = 4; gbc.ipadx = -1; gbc.ipady = -2; return gbc; }
Example 10
Source File: SecondaryPanel.java From Robot-Overlord-App with GNU General Public License v2.0 | 6 votes |
public SecondaryPanel() { super(); makeBottomPanel(); makeGCodePanel(); makeLogPanel(); // now that the panels are all made, glue them together tabbedPane = new JTabbedPane(); tabbedPane.addTab("Log", logPanel); tabbedPane.addTab("GCODE", gcodePanel); setLayout(new GridBagLayout()); GridBagConstraints c = new GridBagConstraints(); c.gridx=0; c.gridy=0; c.weightx=1.0; c.anchor=GridBagConstraints.NORTH; //c.fill = GridBagConstraints.HORIZONTAL; c.weighty=0.0; this.add(top, c); c.gridy++; c.fill = GridBagConstraints.BOTH; c.weighty=1.0; this.add(tabbedPane,c); c.gridy++; c.fill = GridBagConstraints.HORIZONTAL; c.weighty=0.0; this.add(bottom, c); c.gridy++; }
Example 11
Source File: ModelTableView.java From arcusplatform with Apache License 2.0 | 5 votes |
protected void showEmptyMessage(JPanel contents) { GridBagConstraints gbc = new GridBagConstraints(); gbc.fill = GridBagConstraints.HORIZONTAL; gbc.anchor = GridBagConstraints.NORTH; gbc.weightx = 1.0; gbc.weighty = 1.0; contents.add(empty, gbc); }
Example 12
Source File: VanetSimStart.java From VanetSim with GNU General Public License v3.0 | 5 votes |
/** * Function to add the control elements to a container. * * @param container the container on which to add the elements * * @return the constructed <code>DrawingArea</code> */ public static DrawingArea addComponentsToPane(Container container) { container.setLayout(new GridBagLayout()); GridBagConstraints c = new GridBagConstraints(); DrawingArea drawarea = new DrawingArea(useDoubleBuffering_, drawManualBuffered_); c.fill = GridBagConstraints.BOTH; c.anchor = GridBagConstraints.NORTH; c.weightx = 1; c.weighty = 1; c.gridx = 0; c.gridy = 0; c.gridheight = 1; container.add(drawarea, c); Renderer.getInstance().setDrawArea(drawarea); controlPanel_ = new MainControlPanel(); controlPanel_.setPreferredSize(new Dimension(200, 100000)); c.fill = GridBagConstraints.BOTH; c.weightx = 0; c.gridx = 1; c.gridy = 0; container.add(controlPanel_, c); return drawarea; }
Example 13
Source File: UpdateFrame.java From GIFKR with GNU Lesser General Public License v3.0 | 5 votes |
public UpdateFrame(Program p, String version) { super("Update"); this.p = p; this.version = version; initializeComponents(); addActionListeners(); setLayout(new GridBagLayout()); GridBagConstraints gbc = new GridBagConstraints(); gbc.weightx = 1; gbc.weighty = 0; gbc.gridx = 0; gbc.gridy = 0; gbc.gridwidth = 3; gbc.anchor = GridBagConstraints.NORTH; gbc.fill = GridBagConstraints.HORIZONTAL; gbc.insets = new Insets(5,5,5,5); add(infoPane, gbc); gbc.gridy++; gbc.fill = GridBagConstraints.NONE; add(updateButton, gbc); setAlwaysOnTop(true); setSize(450, 150); setResizable(false); }
Example 14
Source File: ControlWindow.java From ChatGameFontificator with The Unlicense | 4 votes |
private void setupHelp() { final String helpTitle = "Chat Game Fontificator Help"; help = new JDialog(this, true); help.setTitle(helpTitle); help.setSize(640, 480); help.setLayout(new GridBagLayout()); JEditorPane helpPane = new JEditorPane(); helpPane.setContentType("text/html"); helpPane.setText(helpText); helpPane.setEditable(false); JScrollPane scrollHelp = new JScrollPane(helpPane, JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, JScrollPane.HORIZONTAL_SCROLLBAR_NEVER); JButton ok = new JButton("Close"); ok.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { help.setVisible(false); } }); GridBagConstraints gbc = new GridBagConstraints(); gbc.gridy = 0; gbc.weightx = 1.0; gbc.weighty = 0.0; gbc.fill = GridBagConstraints.NONE; gbc.anchor = GridBagConstraints.NORTH; help.add(new JLabel("The function of each option available in the Control Window tabs is explained below"), gbc); gbc.fill = GridBagConstraints.BOTH; gbc.anchor = GridBagConstraints.CENTER; gbc.weightx = 1.0; gbc.weighty = 1.0; gbc.gridy = 1; help.add(scrollHelp, gbc); gbc.gridy++; gbc.fill = GridBagConstraints.NONE; gbc.anchor = GridBagConstraints.SOUTH; gbc.weighty = 0.0; help.add(ok, gbc); help.setResizable(false); }
Example 15
Source File: Tree.java From TrakEM2 with GNU General Public License v3.0 | 4 votes |
private void createGUI() { this.frame = new JFrame("Nodes for " + Tree.this); frame.addWindowListener(new WindowAdapter() { @Override public void windowClosing(final WindowEvent we) { Tree.this.tndv = null; } }); final JTabbedPane tabs = new JTabbedPane(); tabs.setPreferredSize(new Dimension(500, 500)); tabs.add("All nodes", new JScrollPane(table_allnodes)); tabs.add("Branch nodes", new JScrollPane(table_branchnodes)); tabs.add("End nodes", new JScrollPane(table_endnodes)); final JTextField search = new JTextField(14); search.addKeyListener(new KeyAdapter() { @Override public void keyPressed(final KeyEvent ke) { if (ke.getKeyCode() == KeyEvent.VK_ENTER) { search(search.getText()); } } }); final JButton b = new JButton("Search"); b.addActionListener(new ActionListener() { @Override public void actionPerformed(final ActionEvent ae) { search(search.getText()); } }); final JPanel pane = new JPanel(); final GridBagLayout gb = new GridBagLayout(); pane.setLayout(gb); final GridBagConstraints c = new GridBagConstraints(); c.gridx = 0; c.gridy = 0; c.weightx = 1; c.gridwidth = 1; c.anchor = GridBagConstraints.NORTH; c.fill = GridBagConstraints.BOTH; c.insets = new Insets(4,10,5,2); gb.setConstraints(search, c); pane.add(search); c.gridx = 1; c.weightx = 0; c.fill = GridBagConstraints.NONE; c.insets = new Insets(4,0,5,10); gb.setConstraints(b, c); pane.add(b); c.gridx = 0; c.gridy = 1; c.gridwidth = 2; c.weighty = 1; c.fill = GridBagConstraints.BOTH; final JScrollPane scp = new JScrollPane(table_searchnodes); c.insets = new Insets(0,0,0,0); gb.setConstraints(scp, c); pane.add(scp); tabs.add("Search", pane); frame.getContentPane().add(tabs); frame.pack(); ij.gui.GUI.center(frame); frame.setVisible(true); }
Example 16
Source File: TransferViewBuilder.java From raccoon4 with Apache License 2.0 | 4 votes |
@Override protected JPanel assemble() { peers = new Vector<TransferPeerBuilder>(); GridBagConstraints spacerConstraints = new GridBagConstraints(); spacerConstraints.gridx = GridBagConstraints.REMAINDER; spacerConstraints.gridy = GridBagConstraints.RELATIVE; spacerConstraints.weightx = 1; spacerConstraints.weighty = 1; spacerConstraints.fill = GridBagConstraints.BOTH; list = new JPanel(); list.setLayout(new GridBagLayout()); contentConstraints = new GridBagConstraints(); contentConstraints.gridx = GridBagConstraints.REMAINDER; contentConstraints.gridy = GridBagConstraints.RELATIVE; contentConstraints.fill = GridBagConstraints.HORIZONTAL; contentConstraints.anchor = GridBagConstraints.NORTH; contentConstraints.insets.bottom = 3; ActionLocalizer al = Messages.getLocalizer(); trim = new JButton(al.localize("trimdownloads")); trim.addActionListener(this); list.add(new JPanel(), spacerConstraints); JPanel cont = new JPanel(); cont.setLayout(new GridBagLayout()); GridBagConstraints contgbc = new GridBagConstraints(); if (!globals.get(Traits.class).isAvailable("4.0.x")) { JTextArea txt = new JTextArea(Messages.getString(ID + ".booster.plug")); txt.setLineWrap(true); txt.setWrapStyleWord(true); txt.setPreferredSize(new Dimension(ITEMWIDTH + 2 * 10,50)); txt.setEditable(false); txt.setBackground(null); txt.setForeground(Color.RED); cont.add(txt,contgbc); contgbc.gridx=0; contgbc.gridy =1; contgbc.insets = new Insets(5,5,5,5); contgbc.anchor=GridBagConstraints.NORTHEAST; order=new JButton(Messages.getString(ID + ".booster.ok")); order.addActionListener(this); cont.add(order,contgbc); contgbc.gridy=2; contgbc.gridx=0; } JScrollPane tmp = new JScrollPane(list); tmp.setBorder(BorderFactory.createEmptyBorder()); tmp.getVerticalScrollBar().setUnitIncrement(20); tmp.setPreferredSize(new Dimension(ITEMWIDTH + 2 * 10, 400)); tmp.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); contgbc.weightx=1; contgbc.weighty=1; cont.add(tmp,contgbc); JPanel ret = new DialogBuilder(cont) .withTitle(Messages.getString(ID + ".title")) .withSubTitle(Messages.getString(ID + ".subtitle")) .withButtons(new ButtonBarBuilder().add(trim)).build(globals); globals.get(TransferManager.class).setPeer(this); return ret; }
Example 17
Source File: GraphPanel.java From chipster with MIT License | 4 votes |
/** * Creates a new GraphPanel with default contents and appearance. */ public GraphPanel() { getGraph().getSelectionModel().addGraphSelectionListener(new WorkflowSelectionListener()); getGraph().setMarqueeHandler(new BasicMarqueeHandler()); // getGraph().setDebugGraphicsOptions(DebugGraphics.LOG_OPTION); // getGraph().setDoubleBuffered(false); this.setMinimumSize(new Dimension(0, 0)); this.setLayout(new GridBagLayout()); buttonToolBar = this.getButtonToolBar(); graphScroller = this.getGraphScroller(); this.setPreferredSize(new Dimension(VisualConstants.LEFT_PANEL_WIDTH, VisualConstants.GRAPH_PANEL_HEIGHT)); graphScroller.setPreferredSize(new Dimension(VisualConstants.LEFT_PANEL_WIDTH, VisualConstants.GRAPH_PANEL_HEIGHT)); GridBagConstraints c = new GridBagConstraints(); c.fill = GridBagConstraints.HORIZONTAL; c.anchor = GridBagConstraints.SOUTH; c.gridy = 1; this.add(buttonToolBar, c); c.gridx = 0; c.gridy = 2; c.fill = GridBagConstraints.BOTH; c.anchor = GridBagConstraints.NORTH; c.weightx = 1.0; c.weighty = 1.0; this.add(graphScroller, c); // start listening application.addClientEventListener(this); application.getDataManager().addDataChangeListener(this); graph.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); graph.setScale(graph.getScale() / ZOOM_FACTOR); // adds vertex renderer which adds the small '+' and '-' buttons to group VertexView.renderer = new GraphRenderer(); }
Example 18
Source File: HistoryDetailsPanel.java From triplea with GNU General Public License v3.0 | 4 votes |
@SuppressWarnings("unchecked") void render(final HistoryNode node) { mapPanel.setRoute(null); content.removeAll(); final Insets insets = new Insets(5, 0, 0, 0); title.setText(node.getTitle()); content.add( title, new GridBagConstraints( 0, 0, 1, 1, 1, 0.1, GridBagConstraints.NORTH, GridBagConstraints.BOTH, insets, 0, 0)); final GridBagConstraints mainConstraints = new GridBagConstraints( 0, 1, 1, 1, 1, 0.9, GridBagConstraints.NORTH, GridBagConstraints.BOTH, insets, 0, 0); if (node instanceof Renderable) { final Object details = ((Renderable) node).getRenderingData(); if (details instanceof DiceRoll) { final DicePanel dicePanel = new DicePanel(mapPanel.getUiContext(), data); dicePanel.setDiceRoll((DiceRoll) details); content.add(dicePanel, mainConstraints); } else if (details instanceof MoveDescription) { final MoveDescription moveMessage = (MoveDescription) details; renderUnits(mainConstraints, moveMessage.getUnits()); mapPanel.setRoute(moveMessage.getRoute()); showTerritory(moveMessage.getRoute().getEnd()); } else if (details instanceof PlacementDescription) { final PlacementDescription placeMessage = (PlacementDescription) details; renderUnits(mainConstraints, placeMessage.getUnits()); showTerritory(placeMessage.getTerritory()); } else if (details instanceof Collection) { final Collection<Object> objects = (Collection<Object>) details; final Iterator<Object> objIter = objects.iterator(); if (objIter.hasNext()) { final Object obj = objIter.next(); if (obj instanceof Unit) { final Collection<Unit> units = (Collection<Unit>) details; renderUnits(mainConstraints, units); } } } else if (details instanceof Territory) { showTerritory((Territory) details); } } content.add(Box.createGlue()); validate(); repaint(); }
Example 19
Source File: SignatureHelpWindow.java From SAMLRaider with MIT License | 4 votes |
public SignatureHelpWindow() { setTitle("SAML Signature Help"); setMinimumSize(new Dimension(496, 415)); setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); setBounds(100, 100, 496, 415); contentPane = new JPanel(); contentPane.setBorder(new EmptyBorder(5, 5, 5, 5)); setContentPane(contentPane); GridBagLayout gbl_contentPane = new GridBagLayout(); gbl_contentPane.columnWidths = new int[] { 224, 0, 0 }; gbl_contentPane.rowHeights = new int[] { 0, 0, 62, 0, 0, 0, 0 }; gbl_contentPane.columnWeights = new double[] { 0.0, 1.0, Double.MIN_VALUE }; gbl_contentPane.rowWeights = new double[] { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, Double.MIN_VALUE }; contentPane.setLayout(gbl_contentPane); JLabel lblSamlSignaturesHelp = new JLabel("SAML Signatures Help"); lblSamlSignaturesHelp.setFont(new Font("Tahoma", Font.PLAIN, 14)); GridBagConstraints gbc_lblSamlSignaturesHelp = new GridBagConstraints(); gbc_lblSamlSignaturesHelp.anchor = GridBagConstraints.WEST; gbc_lblSamlSignaturesHelp.insets = new Insets(0, 0, 5, 5); gbc_lblSamlSignaturesHelp.gridx = 0; gbc_lblSamlSignaturesHelp.gridy = 0; contentPane.add(lblSamlSignaturesHelp, gbc_lblSamlSignaturesHelp); JLabel lblNewLabel = new JLabel("Certificate Combo Box"); GridBagConstraints gbc_lblNewLabel = new GridBagConstraints(); gbc_lblNewLabel.anchor = GridBagConstraints.NORTHWEST; gbc_lblNewLabel.insets = new Insets(0, 0, 5, 5); gbc_lblNewLabel.gridx = 0; gbc_lblNewLabel.gridy = 2; contentPane.add(lblNewLabel, gbc_lblNewLabel); JLabel lblChooseACertificate = new JLabel( "<html>Choose a certificate of this list to sign the message or the assertion. You can " + "manage the SAML Certificates in the SAML Certificates Tab.</html>"); GridBagConstraints gbc_lblChooseACertificate = new GridBagConstraints(); gbc_lblChooseACertificate.anchor = GridBagConstraints.NORTH; gbc_lblChooseACertificate.fill = GridBagConstraints.HORIZONTAL; gbc_lblChooseACertificate.insets = new Insets(0, 0, 5, 0); gbc_lblChooseACertificate.gridx = 1; gbc_lblChooseACertificate.gridy = 2; contentPane.add(lblChooseACertificate, gbc_lblChooseACertificate); JLabel lblResignMessage = new JLabel("Resign Message / Assertion"); GridBagConstraints gbc_lblResignMessage = new GridBagConstraints(); gbc_lblResignMessage.anchor = GridBagConstraints.NORTHWEST; gbc_lblResignMessage.insets = new Insets(0, 0, 5, 5); gbc_lblResignMessage.gridx = 0; gbc_lblResignMessage.gridy = 4; contentPane.add(lblResignMessage, gbc_lblResignMessage); JLabel lblWithTheChosen = new JLabel( "<html> With the chosen certificate the message or " + "the assertion is signed. If the message or assertion was signed, the signature is replaced. <br/> " + "If you choose to sign the assertion, the message signature is removed, because the signature gets invalid.</html>"); GridBagConstraints gbc_lblWithTheChosen = new GridBagConstraints(); gbc_lblWithTheChosen.fill = GridBagConstraints.HORIZONTAL; gbc_lblWithTheChosen.insets = new Insets(0, 0, 5, 0); gbc_lblWithTheChosen.gridx = 1; gbc_lblWithTheChosen.gridy = 4; contentPane.add(lblWithTheChosen, gbc_lblWithTheChosen); }
Example 20
Source File: DeskewTransformSettingsPanel.java From swingsane with Apache License 2.0 | 4 votes |
private void initComponents() { GridBagLayout gridBagLayout = new GridBagLayout(); gridBagLayout.columnWidths = new int[] { 32, 0 }; gridBagLayout.rowHeights = new int[] { 24, 0 }; gridBagLayout.columnWeights = new double[] { 1.0, Double.MIN_VALUE }; gridBagLayout.rowWeights = new double[] { 0.0, Double.MIN_VALUE }; setLayout(gridBagLayout); JPanel containerPanel = new JPanel(); containerPanel.setBorder(new CompoundBorder(new TitledBorder(Localizer .localize("DeskewSettingsBorderTitle")), new EmptyBorder(5, 5, 5, 5))); GridBagConstraints gbc_containerPanel = new GridBagConstraints(); gbc_containerPanel.fill = GridBagConstraints.HORIZONTAL; gbc_containerPanel.anchor = GridBagConstraints.NORTH; gbc_containerPanel.gridx = 0; gbc_containerPanel.gridy = 0; add(containerPanel, gbc_containerPanel); GridBagLayout gbl_containerPanel = new GridBagLayout(); gbl_containerPanel.columnWidths = new int[] { 0, 0, 0 }; gbl_containerPanel.rowHeights = new int[] { 24, 0 }; gbl_containerPanel.columnWeights = new double[] { 1.0, 1.0, Double.MIN_VALUE }; gbl_containerPanel.rowWeights = new double[] { 0.0, Double.MIN_VALUE }; containerPanel.setLayout(gbl_containerPanel); JLabel deskewThresholdLabel = new JLabel(Localizer.localize("DeskewThresholdLabelText")); deskewThresholdLabel.setFont(UIManager.getFont("Label.font")); GridBagConstraints gbc_deskewThresholdLabel = new GridBagConstraints(); gbc_deskewThresholdLabel.insets = new Insets(0, 0, 0, 5); gbc_deskewThresholdLabel.anchor = GridBagConstraints.EAST; gbc_deskewThresholdLabel.gridx = 0; gbc_deskewThresholdLabel.gridy = 0; containerPanel.add(deskewThresholdLabel, gbc_deskewThresholdLabel); deskewThresholdSpinner = new JSpinner(); deskewThresholdSpinner.addChangeListener(new ChangeListener() { @Override public void stateChanged(ChangeEvent e) { deskewThresholdStateChanged(e); } }); deskewThresholdSpinner.setModel(new SpinnerNumberModel(2.0d, 0.0d, 180.0d, 0.1d)); deskewThresholdSpinner.setFont(UIManager.getFont("Spinner.font")); GridBagConstraints gbc_deskewThresholdSpinner = new GridBagConstraints(); gbc_deskewThresholdSpinner.anchor = GridBagConstraints.WEST; gbc_deskewThresholdSpinner.gridx = 1; gbc_deskewThresholdSpinner.gridy = 0; containerPanel.add(deskewThresholdSpinner, gbc_deskewThresholdSpinner); }