Package charva.awt

Examples of charva.awt.Container


  /* Blank out the area of this component, but only if this
   * component's color-pair is different than that of the
   * parent container.
   */
  int colorpair = getCursesColor();
  Container parent = getParent();
  if (parent != null && colorpair != parent.getCursesColor())
      toolkit.blankBox(origin, this.getSize(), colorpair);

  // Draw the border if there is one.
  if (_border != null) {
      _border.paintBorder(this, colorpair,
View Full Code Here


    this.isFocusTraversable()) {

      if (e_.getClickCount() == 1) {
    int y = e_.getY();
    Point origin = getLocationOnScreen();
    Container parent = getParent();
    if (parent instanceof JViewport) {
        _currentRow = y - origin.y;
        repaint();
    }
      }
View Full Code Here

            /*
             * Get the contained container to lay itself out at its preferred
             * size.
             */
            if (c instanceof Container) {
                Container cont = (Container) c;
                cont.setSize(cont.minimumSize());
                cont.doLayout();
            }

            Dimension componentsize = c.getSize();
            if (_axis == X_AXIS) {
                float alignment = c.getAlignmentY();
View Full Code Here

        return new Dimension(this.getWidth(), getHeight());
    }

    public int getWidth() {
        // get the width of our parent JFrame.
        Container parent = getParent();
        if (parent == null) { throw new IllegalComponentStateException(
                "can't get menubar size before "
                        + "it has been added to a frame"); }

        int parentwidth = parent.getWidth() - 2;
        int minwidth = minimumSize().width;
        int width = (parentwidth > minwidth) ? parentwidth : minwidth;
        return width;
    }
View Full Code Here

    {
  return new Dimension(this.getWidth(), this.getHeight());
    }

    public int getWidth() {
  Container parent = getParent();
  Insets insets = parent.getInsets();
  int availableWidth = parent.getSize().width -
      insets.left - insets.right;

  return availableWidth;
    }
View Full Code Here

        public CharvaShell() {
            super("Charva Beanshell v1.0");
            setForeground(Color.green);
            setBackground(Color.black);

            Container cp = super.getContentPane();
            cp.setLayout(new BorderLayout());

            addMenuBar();

            messagePanel.setLayout(new BoxLayout(messagePanel, BoxLayout.Y_AXIS));
            topLabel = new JLabel("F12[evaluate], F1[clear-output], F5[clear-editor]");
            messagePanel.add(topLabel);
            bottomLabel = new JLabel("");
            messagePanel.add(bottomLabel);

            cp.add(messagePanel, BorderLayout.SOUTH);

            editor = new JTextArea(example, 8, 75);
            JScrollPane scrollEditor = new JScrollPane(editor);
            scrollEditor.setViewportBorder(new TitledBorder("Beanshell Editor"));

            output = new JTextArea("BSH output", 7, 75);
            output.setLineWrap(true);

            JScrollPane scrollOutput = new JScrollPane(output);
            scrollOutput.setViewportBorder(new TitledBorder("Beanshell Output"));

            bshPanel.setLayout(new BorderLayout());
            bshPanel.add(scrollEditor, BorderLayout.NORTH);
            bshPanel.add(scrollOutput, BorderLayout.SOUTH);
            cp.add(bshPanel, BorderLayout.CENTER);

            editor.addKeyListener(new KeyAdapter() {
                public void keyPressed(KeyEvent ke) {
                    if (ke.getKeyCode() == KeyEvent.VK_F12) {
                        evaluateText();
View Full Code Here

TOP

Related Classes of charva.awt.Container

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.