Package charva.awt

Examples of charva.awt.Point


   */
  super.requestFocus();

  /* Get the absolute origin of this component.
   */
  Point origin = getLocationOnScreen();
  Insets insets = super.getInsets();
  Toolkit.getDefaultToolkit().setCursor(
    origin.addOffset(1 + insets.left, 0 + insets.top));
    }
View Full Code Here


  // Draw the border if it exists
  super.draw(toolkit);

  /* Get the absolute origin of this component.
   */
  Point origin = getLocationOnScreen();
  Insets insets = super.getInsets();
  origin.translate(insets.left, insets.top);

  int colorpair = getCursesColor();

  int offset = ((_value - _minimum) * _width) / _maximum;

  if ( ! isIndeterminate()) {
      for (int i=0; i< offset; i++) {
    toolkit.setCursor(origin.addOffset(i, 0));
    toolkit.addChar(' ', Toolkit.A_REVERSE, colorpair);
      }
      for (int k=offset; k<_width; k++) {
    toolkit.setCursor(origin.addOffset(k,0));
    toolkit.addChar(Toolkit.ACS_CKBOARD, 0, colorpair);
      }
  }
  else {
      for (int i=0; i< _width; i++) {
    toolkit.setCursor(origin.addOffset(i, 0));
    toolkit.addChar(' ', 0, colorpair);
      }
      toolkit.setCursor(origin.addOffset(offset, 0));
      toolkit.addChar(' ', Toolkit.A_REVERSE, colorpair);
  }

  // Display the progress string if required
  if (isStringPainted()) {
      offset = (getSize().width - _string.length()) / 2;
      toolkit.setCursor(origin.addOffset(offset, 0));
      toolkit.addString(_string, 0, colorpair);
  }
    }
View Full Code Here

  String valstring;

  /* Get the absolute origin of this component.
   */
  Point origin = getLocationOnScreen();
  Insets insets = super.getInsets();

  toolkit.setCursor(origin.addOffset(insets.left, insets.top));
  if (super.isSelected())
      valstring = "[*] ";
  else
      valstring = "[ ] ";

View Full Code Here

   */
  super.requestFocus();

  /* Get the absolute origin of this component.
   */
  Point origin = getLocationOnScreen();
  Insets insets = super.getInsets();
  Toolkit.getDefaultToolkit().setCursor(
    origin.addOffset(1 + insets.left, 0 + insets.top));
    }
View Full Code Here

  String valstring;

  /* Get the absolute origin of this component.
   */
  Point origin = getLocationOnScreen();
  Insets insets = super.getInsets();

  toolkit.setCursor(origin.addOffset(insets.left, insets.top));
  if (super.isSelected())
      valstring = "(*) ";
  else
      valstring = "( ) ";

View Full Code Here

   */
  super.requestFocus();

  /* Get the absolute origin of this component.
   */
  Point origin = getLocationOnScreen();
  Insets insets = super.getInsets();
  Toolkit.getDefaultToolkit().setCursor(
    origin.addOffset(1 + insets.left, 0 + insets.top));
    }
View Full Code Here

    public void draw(Toolkit toolkit) {

  /* Get the absolute origin of this component.
   */
  Point origin = getLocationOnScreen();


  // we'll sort out justification and video-attributes etc later.
  Enumeration<String> e = _labeltext.elements();
  for (int row=0; e.hasMoreElements(); row++) {
      String s = (String) e.nextElement();
      toolkit.setCursor(origin.addOffset(0, row));
      toolkit.addString(s, 0, 0);
  }
    }
View Full Code Here

    public JMenuBar() {
        /*
         * The menubar is always offset from the origin of its parent JFrame by
         * (1, 1).
         */
        super._origin = new Point(1, 1);
    }
View Full Code Here

     */
    public void draw(Toolkit toolkit) {
        /*
         * Get the absolute origin of this component.
         */
        Point origin = getLocationOnScreen();

        int colorpair = getCursesColor();

        /*
         * Build a horizontal line of spaces extending across the top of the
View Full Code Here

     */
    Point getPopupMenuLocation(JMenu menu_) {
        /*
         * Get the origin of this menubar
         */
        Point origin = getLocationOnScreen();

        int offset = 0;
        for (int i = 0; i < getMenuCount(); i++) {
            JMenu menu = getMenu(i);
            if (menu == menu_) { return origin.addOffset(offset, 1); }
            String menutext = menu.getText();
            offset += menutext.length() + 1;
        }
        throw new IllegalArgumentException("specified menu not in menubar");
    }
View Full Code Here

TOP

Related Classes of charva.awt.Point

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.