Examples of Panel


Examples of java.awt.Panel

                }
            });
        }

        // add the message to the top of the dialog
        Panel top = new Panel(new FlowLayout(FlowLayout.CENTER, 1, 1));
        mess = new Label(message);
        top.add(mess);
        pbar.add("North", top); //$NON-NLS-1$

        // add the progress bar to the middle of the dialog
        Panel middle = new Panel(new FlowLayout(FlowLayout.CENTER, 1, 1));
        pbox = new ProgressBox(maxValue);
        middle.add(pbox);
        pbar.add("Center", middle); //$NON-NLS-1$

        // add the Cancel button to the bottom of the dialog (if allowCancel is
        // true)
        if (allowCancel) {
            Panel bottom = new Panel(new FlowLayout(FlowLayout.CENTER, 1, 1));
            cancel = new Button(Messages.getString("ProgressBar.cancel")); //$NON-NLS-1$
            cancel.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    // pbar.dispose();
                    shouldCancel = true;
                }
            });
            bottom.add(cancel);
            pbar.add("South", bottom); //$NON-NLS-1$
        }

        // display the ProgressBar dialog
        Dimension d = pbar.getToolkit().getScreenSize();
View Full Code Here

Examples of java.awt.Panel

    public OptionDialog(int type, Object text, Option choices[], OptionCallback callback, Component buttonBarAccessory) {
        super(new BorderLayout());
        lock_ = new Object();
        dismissed = false;
        this.callback = callback;
        Panel titlePanel = new Panel(new FlowLayout(0));
        Image icon = null;
        switch (type) {
        case 0:
            // '\0'
            icon = UIUtil.loadImage(getClass(), INFORMATION_ICON);
            break;
        case 2:
            // '\002'
            icon = UIUtil.loadImage(getClass(), WARNING_ICON);
            break;
        case 1:
            // '\001'
            icon = UIUtil.loadImage(getClass(), QUESTION_ICON);
            break;
        case 99:
            break;
        default:
            icon = UIUtil.loadImage(getClass(), ERROR_ICON);
            break;
        }
        if (icon != null) {
            UIUtil.waitFor(icon, this);
        }
        Panel textPanel = new Panel(new GridBagLayout());
        GridBagConstraints gbc = new GridBagConstraints();
        gbc.anchor = GridBagConstraints.WEST;
        gbc.fill = GridBagConstraints.NONE;
        if (text instanceof Component) {
            UIUtil.gridBagAdd(textPanel, (Component) text, gbc, 0);
        } else {
            StringTokenizer st = new StringTokenizer(String.valueOf(text), "\n"); //$NON-NLS-1$
            while (st.hasMoreTokens()) {
                String n = st.nextToken().trim();
                if (n.length() > 0) {
                    UIUtil.gridBagAdd(textPanel, new Label(n), gbc, 0);
                }
            }
        }
        add(textPanel, "Center"); //$NON-NLS-1$
        Panel choicePanel = new Panel(new FlowLayout(buttonBarAccessory == null ? FlowLayout.CENTER : FlowLayout.RIGHT));
        OptionWrapper choice = new OptionWrapper();
        choice.idx = -1;
        for (int i = 0; choices != null && i < choices.length; i++) {
            //      ImageButton b = new ImageButton(choices[i].getIcon(), choices[i]
            //          .getText(), choices[i].getText());
            Button b = new Button(choices[i].getText()) {
                public Dimension getMinimumSize() {
                    return new Dimension(60, super.getMinimumSize().height);
                }

                public Dimension getPreferredSize() {
                    return getMinimumSize();
                }
            };
            choicePanel.add(b);
            b.addActionListener(new BlockingActionListener(choices[i]));
        }
        if (icon != null) {
            add(new ImageCanvas(icon), "West"); //$NON-NLS-1$
        }
        if(buttonBarAccessory != null) {
            Panel p= new Panel(new GridBagLayout());
            GridBagConstraints gbc2 = new GridBagConstraints();
            gbc2.anchor = GridBagConstraints.WEST;
            gbc2.fill = GridBagConstraints.HORIZONTAL;
            gbc2.insets = new Insets(2, 4, 2, 2);
            UIUtil.gridBagAdd(p, buttonBarAccessory, gbc2, GridBagConstraints.RELATIVE);
View Full Code Here

Examples of jfix.zk.Panel

    navigationTree.addChangeListener(new ActionListener() {
      public void actionPerformed(Event event) {
        forceRefresh();
      }
    });
    navigationPanel = new Panel(navigationTree);
    navigationPanel.setHflex("3");
    appendChild(navigationPanel);
  }
View Full Code Here

Examples of jfix.zk.Panel

    desktopTable.addChangeListener(new ActionListener() {
      public void actionPerformed(Event event) {
        forceRefresh();
      }
    });
    desktopPanel = new Panel(desktopTable);
    desktopPanel.setHflex("9");
    appendChild(desktopPanel);
  }
View Full Code Here

Examples of jfix.zk.Panel

        updateContent();
      }
    });
    grid = new Grid();
    grid.setMold("paging");
    appendChild(new Panel(I18N.get("Browser"), new Row(tree, grid)));
    updateContent();
  }
View Full Code Here

Examples of limelight.ui.Panel

  public static PropogateToParentAction instance = new PropogateToParentAction();

  public void invoke(Event event)
  {
    PanelEvent panelEvent = (PanelEvent)event;
    final Panel parent = panelEvent.getRecipient().getParent();
    if(parent != null)
      panelEvent.dispatch(parent);
  }
View Full Code Here

Examples of net.helipilot50.stocktrade.displayproject.controls.Panel

    //PM:13/6/08 changed to return type of Panel to unsure it is a compound field
    public static Panel getForm(JFrame win) {
                try {
                Expression expr = new Expression(win, "getForm", new Object[0]);
                    expr.execute();
                    Panel form = ((Panel)expr.getValue());
                    return form;
            } catch (Exception e) {
                return null;
            }
View Full Code Here

Examples of net.laubenberger.bogatyr.view.swing.Panel

    password = new PasswordField(localizer.getTooltip(HelperResource.RES_LABEL_UNSCRAMBLE_PASSWORD));

    actionGo = new ActionGo();
    final ActionAbstract actionAbort = new ActionAbort();

    final Panel panel = new Panel(new BorderLayout());
    panel.setBorder(BorderFactory.createEmptyBorder(10, 10, 5, 10));

    // column 1
    final GridBagConstraints gbc = new GridBagConstraints();
    gbc.fill = GridBagConstraints.HORIZONTAL;
    gbc.anchor = GridBagConstraints.NORTH;
    gbc.gridy = 0;
    gbc.gridx = 0;
    gbc.insets = new Insets(5, 10, 5, 10);

    final Panel panelContent = new Panel(new GridBagLayout());

    Label label = new Label(localizer.getValue(HelperResource.RES_LABEL_UNSCRAMBLE_INPUT));
    panelContent.add(label, gbc);

    gbc.gridy++;
    label = new Label(localizer.getValue(HelperResource.RES_LABEL_UNSCRAMBLE_OUTPUT));
    panelContent.add(label, gbc);

    gbc.gridy++;
    label = new Label(localizer.getValue(HelperResource.RES_LABEL_UNSCRAMBLE_CODEC));
    panelContent.add(label, gbc);

    gbc.gridy++;
    label = new Label(localizer.getValue(HelperResource.RES_LABEL_UNSCRAMBLE_PASSWORD));
    panelContent.add(label, gbc);

    // column 2
    gbc.gridx++;
    gbc.gridy = 0;
    gbc.weightx = 1.0D;

    panelContent.add(tfInput, gbc);

    gbc.gridy++;
    panelContent.add(tfOutput, gbc);

    gbc.gridy++;
    cbCodecs.setSelectedItem(scrambler.getModuleData().getValue(KEY_UNSCRAMBLE_ALGO, CryptoSymmetricAlgo.class));
    cbCodecs.addItemListener(new ItemListener() {
      @Override
      public void itemStateChanged(final ItemEvent e) {
        validateGo();
      }
    });
    panelContent.add(cbCodecs, gbc);

    gbc.gridy++;
    password.addKeyListener(new KeyAdapter() {

      @Override
      public void keyTyped(final KeyEvent e) {
        validateGo();
      }
    });
    panelContent.add(password, gbc);

    // column 3
    gbc.gridx++;
    gbc.gridy = 0;
    gbc.weightx = 0.0D;

    panelContent.add(new Button(new ActionInput()), gbc);

    gbc.gridy++;
    panelContent.add(new Button(new ActionOutput()), gbc);

    // spacer
    gbc.gridy = 4;
    gbc.fill = GridBagConstraints.BOTH;
    gbc.weighty = 1.0D;

    panelContent.add(new Panel(), gbc);

    final JScrollPane scroll = new PaneScroll(panelContent);

    final Group group = new Group(new Insets(0, 0, 0, 10), new Button(actionGo), new Button(actionAbort));
View Full Code Here

Examples of nextapp.echo2.app.Panel

       
        ButtonColumn controlsColumn = new ButtonColumn();
        controlsColumn.setStyleName("TestControlsColumn");
        add(controlsColumn);
       
        final Panel panel = new Panel() { };
        add(panel);

        controlsColumn.addButton("Reset", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                panel.setBackground(null);
                panel.setForeground(null);
                panel.setFont(null);
            }
        });
        controlsColumn.addButton("Change Background", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                panel.setBackground(StyleUtil.randomColor());
            }
        });
        controlsColumn.addButton("Change Foreground", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                panel.setForeground(StyleUtil.randomColor());
            }
        });
        controlsColumn.addButton("Change Font", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                panel.setFont(StyleUtil.randomFont());
            }
        });
        controlsColumn.addButton("Set Content (Label)", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                if (panel.getComponentCount() > 0) {
                    panel.removeAll();
                }
                panel.add(new Label("Hello, world!"));
            }
        });
        controlsColumn.addButton("Set Content (Long Label)", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                if (panel.getComponentCount() > 0) {
                    panel.removeAll();
                }
                panel.add(new Label(StyleUtil.QUASI_LATIN_TEXT_1));
            }
        });
        controlsColumn.addButton("Set Content (Grid)", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                if (panel.getComponentCount() > 0) {
                    panel.removeAll();
                }
                Grid grid = new Grid();
                grid.setBorder(StyleUtil.randomBorder());
                grid.setInsets(new Insets(StyleUtil.randomExtent(8)));
                grid.add(new Label("A label"));
                grid.add(new Label("A label"));
                grid.add(new Label("A label"));
                grid.add(new Label("A label"));
                grid.add(new Label("A label"));
                panel.add(grid);
            }
        });
        controlsColumn.addButton("Clear Content", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                panel.removeAll();
            }
        });
        controlsColumn.addButton("Add Component", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                if (panel.getParent() == null) {
                    PanelTest.this.add(panel);
                }
            }
        });
        controlsColumn.addButton("Remove Component", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                if (panel.getParent() != null) {
                    PanelTest.this.remove(panel);
                }
            }
        });
        controlsColumn.addButton("Set Border (All Attributes)", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                panel.setBorder(StyleUtil.randomBorder());
            }
        });
        controlsColumn.addButton("Set Border Color", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                Border border = panel.getBorder();
                if (border == null) {
                    border = new Border(new Extent(1), Color.BLUE, Border.STYLE_SOLID);
                }
                panel.setBorder(new Border(border.getSize(), StyleUtil.randomColor(), border.getStyle()));
            }
        });
        controlsColumn.addButton("Set Border Size", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                panel.setBorder(StyleUtil.nextBorderSize(panel.getBorder()));
            }
        });
        controlsColumn.addButton("Set Border Style", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                panel.setBorder(StyleUtil.nextBorderStyle(panel.getBorder()));
            }
        });
        controlsColumn.addButton("Remove Border", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                panel.setBorder(null);
            }
        });
        controlsColumn.addButton("Insets -> null", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                panel.setInsets(null);
            }
        });
        controlsColumn.addButton("Insets -> 0px", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                panel.setInsets(new Insets(0));
            }
        });
        controlsColumn.addButton("Insets -> 5px", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                panel.setInsets(new Insets(5));
            }
        });
        controlsColumn.addButton("Insets -> 10/20/30/40px", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                panel.setInsets(new Insets(10, 20, 30, 40));
            }
        });
    }
View Full Code Here

Examples of org.apache.click.control.Panel

    @Resource(name="customerService")
    private CustomerService customerService;

    public TabbedPanelDemo() {
        Panel panel1 = new Panel("panel1", "panel/customersPanel1.htm");
        panel1.setLabel("The First Panel");
        tabbedPanel.add(panel1);

        Panel panel2 = new Panel("panel2", "panel/customersPanel2.htm");
        panel2.setLabel("The Second Panel");
        tabbedPanel.add(panel2);

        Panel panel3 = new Panel("panel3", "panel/customersPanel3.htm");
        panel3.setLabel("The Third Panel");
        tabbedPanel.add(panel3);

        // Register a listener that is notified when a different panel is selected.
        tabbedPanel.setTabListener(this, "onTabClick");
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.