Package charva.awt

Examples of charva.awt.Dimension


  }
    }

    public Dimension minimumSize()
    {
  return new Dimension(this.getWidth(), getHeight());
    }
View Full Code Here


     * Return the size of the text field. Overrides the method in the
     * Component superclass.
     */
    public Dimension getSize() {
  Insets insets = super.getInsets();
  return new Dimension(_columns + insets.left + insets.right,
    1 + insets.top + insets.bottom);
    }
View Full Code Here

    /**
     * Overrides the corresponding method in Container.
     */
    public void setSize(int width_, int height_) {
        super.setSize(width_, height_);
        Dimension size = new Dimension(width_, height_);
        if (_border != null) {
            Insets borderInsets = _border.getBorderInsets(this);
            size.height -= (borderInsets.top + borderInsets.bottom);
            size.width -= (borderInsets.left + borderInsets.right);
        }
View Full Code Here

    /**
     * Overrides the minimumSize() method of Container.
     */
    public Dimension minimumSize() {

        Dimension size = new Dimension();
        Component view = getViewport().getView();
        if (view instanceof Scrollable) {
            Scrollable s = (Scrollable) view;
            size.setSize(s.getPreferredScrollableViewportSize());
        } else {
            size.setSize(view.getSize());
        }

        // Set the size of the viewport(s) as well
        setViewportExtents(size);

View Full Code Here

            borderInsets = getViewportBorder().getBorderInsets(this);
        } else
            borderInsets = new Insets(0, 0, 0, 0);

        int colorpair = getCursesColor();
        Dimension size = minimumSize();

        if (_border != null) {

            _border.paintBorder(this, 0, origin.x, origin.y, size.width,
                    size.height, toolkit);
        }

        // Don't draw scrollbars if the child component is a TableHeader.
        if (_child instanceof TableHeader) return;

        /*
         * If the child component is larger than the viewport, draw scrollbars.
         */

        // The size of the component displayed within the viewport.
        Dimension childSize = getViewport().getViewSize();

        // The size of the viewport
        Dimension extentSize = getViewport().getExtentSize();
        Point viewPosition = getViewport().getViewPosition();

        // If the child is a JTable, we have to adjust the
        // parameters a bit because the viewport includes the header.
        /*
 
View Full Code Here

    public void setColumns(int cols_) {
  _columns = cols_;
    }

    public Dimension getSize() {
  return new Dimension(getWidth(), getHeight());
    }
View Full Code Here

    }

    /** Returns the size of the viewport needed to display visibleRows rows.
     */
    public Dimension getPreferredScrollableViewportSize() {
  return new Dimension(getWidth(), getVisibleRowCount());
    }
View Full Code Here

  /* Take into account the border inherited from the JComponent
   * superclass.
   */
  Insets insets = super.getInsets();
  return new Dimension(_columns + insets.left + insets.right,
    _visibleRows + insets.top + insets.bottom);
    }
View Full Code Here

    /**
     * We pretend that the table header is two rows in height so that the
     * box gets drawn correctly.
     */
    public Dimension getSize() {
  return new Dimension(this.getWidth(), this.getHeight());
    }
View Full Code Here

            }
        }
    }

    public Dimension minimumSize() {
        return new Dimension(this.getWidth(), 1);
    }
View Full Code Here

TOP

Related Classes of charva.awt.Dimension

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.