Package jcurses.util

Examples of jcurses.util.Rectangle


    }
  }
 
 
  protected Rectangle getPreferredSize() {
    return new Rectangle(2+getMaxLength(),1);
  }
View Full Code Here


    return result;
  }
 
 
  protected void doPaint() {
    Rectangle rect = (Rectangle)getSize().clone();
    rect.setLocation(getAbsoluteX(), getAbsoluteY());
    String text = "["+getText()+"]";
    CharColor colors = hasFocus()?getFocusedPopUpColors():getColors();
    Toolkit.printString(text,rect, colors);
  }
View Full Code Here

  */
  protected abstract void paintSelf();
 
 
  private Rectangle getChildsClippingRectangle() {
    Rectangle rect = (getChildsRectangle() == null)?getSize():getChildsRectangle();
    int x = getAbsoluteX()+rect.getX();
    int y = getAbsoluteY()+rect.getY();
    rect.setLocation(x,y);
    return rect;
  }
View Full Code Here

    _scrollbarColors = colors;
  }
 
 
  protected Rectangle getTextRectangle() {
    Rectangle result = (Rectangle)getSize().clone();
    result.setLocation(getAbsoluteX()+1,getAbsoluteY()+1);
    result.setWidth(result.getWidth()-2);
    result.setHeight(result.getHeight()-2);
   
    return result;
  }
View Full Code Here

 
 
 
 
  protected Rectangle getPreferredSize() {
    return new Rectangle(getWidth(), getHeight());
  }
View Full Code Here

  }
 
 
 
  public Rectangle getBorderRectangle() {
    Rectangle rect = (Rectangle)getSize().clone();
    rect.setLocation(getAbsoluteX(), getAbsoluteY());
    return rect;
  }
View Full Code Here

    _delimiterColors = colors;
  }
 
 
  protected Rectangle getTextRectangle() {
    Rectangle result = (Rectangle)getSize().clone();
    result.setLocation(getAbsoluteX()+1,getAbsoluteY());
    result.setWidth(result.getWidth()-2);
   
    return result;
  }
View Full Code Here

   
  }
 
 
  protected Rectangle getPreferredSize() {
    return new Rectangle(getWidth(), getHeight());
  }
View Full Code Here

      throw new RuntimeException("unknown constraint: "+constraint.getClass().getName());
    }
   
    DefaultLayoutConstraint cstr = (DefaultLayoutConstraint)constraint;
   
    Rectangle prefSize = widget.getPreferredSize();
   
    int prefWidth = prefSize.getWidth();
    int prefHeight = prefSize.getHeight();
    /**
    *  Negativ oder 0 bedeutet, da� keine bevorzugte Gr�sse angegeben wurde
    */
    if (prefWidth<=0) {
      prefWidth = cstr.width;
    }
   
    if (prefHeight<=0) {
      prefHeight = cstr.height;
    }
   
    int width = 0;
    int height = 0;
   
    if (prefWidth < cstr.width) {
       widget.setX(getAlignedCoordinate(prefWidth, cstr.width, cstr.x, cstr.horizontalConstraint));
          width = prefWidth;
    } else {
      widget.setX(cstr.x);
      width = cstr.width;
    }
   
   
    if (prefHeight < cstr.height) {
       widget.setY(getAlignedCoordinate(prefHeight, cstr.height, cstr.y, cstr.verticalConstraint));
          height = prefHeight;
    } else {
      widget.setY(cstr.y);
      height = cstr.height;
    }
   
    widget.setSize(new Rectangle(width, height));
  }
View Full Code Here

    _separatorString = value;
  }
 
 
  protected Rectangle getPreferredSize() {
    return new Rectangle(getMaxItemLength()+2,getItemsCount()+2);
  }
View Full Code Here

TOP

Related Classes of jcurses.util.Rectangle

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.