Package java.awt

Examples of java.awt.GridBagLayout$MixedConstraints



  private JPanel createMetaDataPanel()
  {
    final JPanel contentPane = new JPanel();
    contentPane.setLayout(new GridBagLayout());

    final JLabel lblAuthor = new JLabel(getResources().getString("pdfsavedialog.author")); //$NON-NLS-1$
    final JLabel lblTitel = new JLabel(getResources().getString("pdfsavedialog.title")); //$NON-NLS-1$
    final JLabel lblKeywords = new JLabel(getResources().getString("pdfsavedialog.keywords")); //$NON-NLS-1$
    final JLabel lblDescription = new JLabel(getResources().getString("pdfsavedialog.description")); //$NON-NLS-1$
View Full Code Here


  private JPanel createExportPanel()
  {
    final JButton btnSelect = new ActionButton(new ActionSelectFile(getResources()));
    final JLabel lblFileName = new JLabel(getResources().getString("pdfsavedialog.filename")); //$NON-NLS-1$
    final JPanel mainPanel = new JPanel();
    mainPanel.setLayout(new GridBagLayout());
    mainPanel.setBorder(BorderFactory.createEmptyBorder(3, 3, 3, 3));
    GridBagConstraints gbc = new GridBagConstraints();
    gbc.gridx = 0;
    gbc.gridy = 0;
    gbc.anchor = GridBagConstraints.WEST;
View Full Code Here

  private JPanel createAdvancedPanel()
  {
    final JLabel lblEncoding = new JLabel(getResources().getString("pdfsavedialog.encoding")); //$NON-NLS-1$
    final JPanel encodingPanel = new JPanel();
    encodingPanel.setBorder(BorderFactory.createTitledBorder(getResources().getString("pdfsavedialog.export-options")));
    encodingPanel.setLayout(new GridBagLayout());
    GridBagConstraints gbc = new GridBagConstraints();
    gbc.anchor = GridBagConstraints.WEST;
    gbc.gridx = 0;
    gbc.gridy = 0;
    gbc.insets = new Insets(1, 1, 1, 1);
    encodingPanel.add(lblEncoding, gbc);

    gbc = new GridBagConstraints();
    gbc.fill = GridBagConstraints.HORIZONTAL;
    gbc.weightx = 1;
    gbc.gridx = 1;
    gbc.gridy = 0;
    gbc.ipadx = 80;
    gbc.insets = new Insets(1, 1, 1, 1);
    encodingPanel.add(cbEncoding, gbc);

    gbc = new GridBagConstraints();
    gbc.fill = GridBagConstraints.HORIZONTAL;
    gbc.weightx = 1;
    gbc.gridx = 1;
    gbc.gridy = 1;
    gbc.ipadx = 80;
    gbc.insets = new Insets(1, 1, 1, 1);
    encodingPanel.add(cxEmbedded, gbc);

    final JPanel securityPanel = new JPanel();
    securityPanel.setLayout(new GridBagLayout());
    securityPanel.setBorder(BorderFactory.createTitledBorder(getResources().getString("pdfsavedialog.security")));

    final JLabel lblUserPass = new JLabel(getResources().getString("pdfsavedialog.userpassword")); //$NON-NLS-1$
    final JLabel lblUserPassConfirm =
        new JLabel(getResources().getString("pdfsavedialog.userpasswordconfirm")); //$NON-NLS-1$
    final JLabel lblOwnerPass =
        new JLabel(getResources().getString("pdfsavedialog.ownerpassword")); //$NON-NLS-1$
    final JLabel lblOwnerPassConfirm =
        new JLabel(getResources().getString("pdfsavedialog.ownerpasswordconfirm")); //$NON-NLS-1$
    final JLabel lbAllowPrinting =
        new JLabel(getResources().getString("pdfsavedialog.allowPrinting")); //$NON-NLS-1$

    gbc = new GridBagConstraints();
    gbc.fill = GridBagConstraints.HORIZONTAL;
    gbc.weightx = 1;
    gbc.gridx = 0;
    gbc.gridwidth = 4;
    gbc.gridy = 1;
    gbc.insets = new Insets(5, 5, 5, 5);
    securityPanel.add(createSecurityConfigPanel(), gbc);

    gbc = new GridBagConstraints();
    gbc.anchor = GridBagConstraints.WEST;
    gbc.gridx = 0;
    gbc.gridy = 2;
    gbc.insets = new Insets(5, 5, 5, 5);
    securityPanel.add(lblUserPass, gbc);

    gbc = new GridBagConstraints();
    gbc.fill = GridBagConstraints.HORIZONTAL;
    gbc.weightx = 1;
    gbc.gridx = 1;
    gbc.gridy = 2;
    gbc.ipadx = 120;
    gbc.insets = new Insets(5, 5, 5, 5);
    securityPanel.add(txUserPassword, gbc);

    gbc = new GridBagConstraints();
    gbc.anchor = GridBagConstraints.WEST;
    gbc.gridx = 0;
    gbc.gridy = 3;
    gbc.insets = new Insets(5, 5, 5, 5);
    securityPanel.add(lblOwnerPass, gbc);

    gbc = new GridBagConstraints();
    gbc.fill = GridBagConstraints.HORIZONTAL;
    gbc.weightx = 1;
    gbc.gridx = 1;
    gbc.gridy = 3;
    gbc.ipadx = 80;
    gbc.insets = new Insets(5, 5, 5, 5);
    securityPanel.add(txOwnerPassword, gbc);

    gbc = new GridBagConstraints();
    gbc.anchor = GridBagConstraints.WEST;
    gbc.gridx = 2;
    gbc.gridy = 2;
    gbc.insets = new Insets(5, 5, 5, 5);
    securityPanel.add(lblUserPassConfirm, gbc);

    gbc = new GridBagConstraints();
    gbc.fill = GridBagConstraints.HORIZONTAL;
    gbc.weightx = 1;
    gbc.gridx = 3;
    gbc.gridy = 2;
    gbc.ipadx = 80;
    gbc.insets = new Insets(5, 5, 5, 5);
    securityPanel.add(txConfUserPassword, gbc);

    gbc = new GridBagConstraints();
    gbc.anchor = GridBagConstraints.WEST;
    gbc.gridx = 2;
    gbc.gridy = 3;
    gbc.insets = new Insets(5, 5, 5, 5);
    securityPanel.add(lblOwnerPassConfirm, gbc);

    gbc = new GridBagConstraints();
    gbc.fill = GridBagConstraints.HORIZONTAL;
    gbc.weightx = 1;
    gbc.gridx = 3;
    gbc.gridy = 3;
    gbc.ipadx = 80;
    gbc.insets = new Insets(5, 5, 5, 5);
    securityPanel.add(txConfOwnerPassword, gbc);

    gbc = new GridBagConstraints();
    gbc.gridx = 0;
    gbc.gridwidth = 2;
    gbc.gridy = 4;
    gbc.anchor = GridBagConstraints.WEST;
    securityPanel.add(cxAllowCopy, gbc);

    gbc = new GridBagConstraints();
    gbc.gridx = 0;
    gbc.gridwidth = 2;
    gbc.gridy = 5;
    gbc.anchor = GridBagConstraints.WEST;
    securityPanel.add(cxAllowScreenReaders, gbc);

    gbc = new GridBagConstraints();
    gbc.gridx = 0;
    gbc.gridwidth = 2;
    gbc.gridy = 6;
    gbc.anchor = GridBagConstraints.WEST;
    securityPanel.add(cxAllowFillIn, gbc);

    gbc = new GridBagConstraints();
    gbc.gridx = 2;
    gbc.gridwidth = 2;
    gbc.gridy = 4;
    gbc.anchor = GridBagConstraints.WEST;
    securityPanel.add(cxAllowAssembly, gbc);

    gbc = new GridBagConstraints();
    gbc.gridx = 2;
    gbc.gridwidth = 2;
    gbc.gridy = 5;
    gbc.anchor = GridBagConstraints.WEST;
    securityPanel.add(cxAllowModifyContents, gbc);

    gbc = new GridBagConstraints();
    gbc.gridx = 2;
    gbc.gridwidth = 2;
    gbc.gridy = 6;
    gbc.anchor = GridBagConstraints.WEST;
    securityPanel.add(cxAllowModifyAnnotations, gbc);

    gbc = new GridBagConstraints();
    gbc.gridx = 0;
    gbc.gridwidth = 1;
    gbc.gridy = 7;
    gbc.anchor = GridBagConstraints.WEST;
    securityPanel.add(lbAllowPrinting, gbc);

    gbc = new GridBagConstraints();
    gbc.gridx = 1;
    gbc.gridwidth = 3;
    gbc.gridy = 7;
    gbc.anchor = GridBagConstraints.WEST;
    securityPanel.add(cbAllowPrinting, gbc);

    final JPanel advancedCarrier2 = new JPanel();
    advancedCarrier2.setLayout(new GridBagLayout());

    gbc = new GridBagConstraints();
    gbc.gridx = 0;
    gbc.fill = GridBagConstraints.HORIZONTAL;
    gbc.gridwidth = 1;
View Full Code Here

   * @return the created content pane.
   */
  private JComponent createExportPane()
  {
    final JPanel contentPane = new JPanel();
    contentPane.setLayout(new GridBagLayout());
    contentPane.setBorder(BorderFactory.createEmptyBorder(3, 3, 3, 3));

    final JLabel lblFileName = new JLabel(getResources().getString("plain-text-exportdialog.filename")); //$NON-NLS-1$
    final JButton btnSelect = new ActionButton(new ActionSelectFile(getResources()));

View Full Code Here

   * @return the created content pane.
   */
  private JComponent createAdvancedPane()
  {
    final JPanel contentPane = new JPanel();
    contentPane.setLayout(new GridBagLayout());
    contentPane.setBorder(BorderFactory.createEmptyBorder(3, 3, 3, 3));

    final JLabel lblPrinterSelect =
        new JLabel(getResources().getString("plain-text-exportdialog.printer")); //$NON-NLS-1$
    final JLabel lblEncoding =
View Full Code Here

     * GUI from the superclass, plus the other attribute display controls.
     */
    public Component getGUI() {
        if (guiPanel == null) {
            guiPanel = new JPanel();
            GridBagLayout gridbag = new GridBagLayout();
            GridBagConstraints c = new GridBagConstraints();
            guiPanel.setLayout(gridbag);

            c.gridwidth = GridBagConstraints.REMAINDER;

            Component sgui = super.getGUI();
            gridbag.setConstraints(sgui, c);
            guiPanel.add(sgui);

            // Attribute GUI
            attributePanel = new JPanel();
            attributePanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(),
                    " Attribute Control "));
            GridBagLayout gridbag2 = new GridBagLayout();
            GridBagConstraints c2 = new GridBagConstraints();
            attributePanel.setLayout(gridbag2);

            c2.gridwidth = GridBagConstraints.RELATIVE;
            c2.anchor = GridBagConstraints.WEST;

            JLabel label = new JLabel("Name: ");
            label.setToolTipText("Choose which attribute to display for each instance of this feature type.");
            gridbag2.setConstraints(label, c2);
            attributePanel.add(label);

            c2.gridwidth = GridBagConstraints.REMAINDER;

            attributeJCB = new JComboBox();
            attributeJCB.setToolTipText("Choose which attribute to display for each instance of this feature type.");
            attributeJCB.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent ae) {
                    JComboBox jcb = (JComboBox) ae.getSource();
                    FCIChoice fcic = (FCIChoice) jcb.getSelectedItem();
                    if (fcic != null) {
                        setAttributeCol(fcic.getColumn());
                        setAttributeColName(fcic.getAttribute());
                    }
                }
            });
            gridbag2.setConstraints(attributeJCB, c2);
            attributePanel.add(attributeJCB);

            c2.gridwidth = GridBagConstraints.RELATIVE;

            label = new JLabel("How: ");
            label.setToolTipText("Choose how to display the attribute.");
            gridbag2.setConstraints(label, c2);
            attributePanel.add(label);

            c2.gridwidth = GridBagConstraints.REMAINDER;

            DisplayTypeChoice[] dtc = new DisplayTypeChoice[] {
                    new DisplayTypeChoice("None", null),
                    new DisplayTypeChoice(OMGraphicConstants.TOOLTIP, OMGraphicConstants.TOOLTIP),
                    new DisplayTypeChoice(OMGraphicConstants.INFOLINE, OMGraphicConstants.INFOLINE),
                    new DisplayTypeChoice(OMGraphicConstants.LABEL, OMGraphicConstants.LABEL) };

            displayTypeJCB = new JComboBox(dtc);
            displayTypeJCB.setToolTipText("Choose how to display the attribute.");
            displayTypeJCB.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent ae) {
                    JComboBox jcb = (JComboBox) ae.getSource();
                    DisplayTypeChoice dtc = (DisplayTypeChoice) jcb.getSelectedItem();
                    setDisplayType(dtc.getDisplayCommand());
                }
            });

            if (OMGraphicConstants.TOOLTIP.equalsIgnoreCase(displayType)) {
                displayTypeJCB.setSelectedIndex(1);
            } else if (OMGraphicConstants.INFOLINE.equalsIgnoreCase(displayType)) {
                displayTypeJCB.setSelectedIndex(2);
            } else if (OMGraphicConstants.LABEL.equalsIgnoreCase(displayType)) {
                displayTypeJCB.setSelectedIndex(3);
            }

            gridbag2.setConstraints(displayTypeJCB, c2);
            attributePanel.add(displayTypeJCB);

            updateAttributeGUI();
            // End attribute GUI

View Full Code Here

  private JTextArea messageOneField;
  private JTextArea messageTwoField;

  public DemoTextInputPanel()
  {
    setLayout(new GridBagLayout());

    final JLabel messageOneLabel = new JLabel("One:");
    final JLabel messageTwoLabel = new JLabel("Two:");
    messageOneField = new JTextArea();
    messageOneField.setWrapStyleWord(true);
View Full Code Here

  private Action updateAction;
  private PreviewPane previewPane;

  public DemoReportController()
  {
    setLayout(new GridBagLayout());

    final JLabel messageOneLabel = new JLabel("One:");
    final JLabel messageTwoLabel = new JLabel("Two:");
    messageOneField = new JTextArea();
    messageOneField.setWrapStyleWord(true);
View Full Code Here

    final JLabel lbDataArea = new JLabel("CSV-Data");
    final JLabel lbLoadData = new JLabel("Load Data from File");
    final ActionButton btLoadData = new ActionButton(new LoadCSVDataAction());

    final JPanel dataPanel = new JPanel();
    dataPanel.setLayout(new GridBagLayout());

    GridBagConstraints gbc = new GridBagConstraints();
    gbc.anchor = GridBagConstraints.WEST;
    gbc.fill = GridBagConstraints.NONE;
    gbc.gridx = 0;
View Full Code Here

   */
  private JPanel createSeparatorPanel()
  {
    // separator panel
    final JPanel separatorPanel = new JPanel();
    separatorPanel.setLayout(new GridBagLayout());

    final TitledBorder tb =
        new TitledBorder(resources.getString("csvdemodialog.separatorchar"));
    separatorPanel.setBorder(tb);

View Full Code Here

TOP

Related Classes of java.awt.GridBagLayout$MixedConstraints

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.