Package jcurses.system

Examples of jcurses.system.CharColor


     */
    public CursesWindow(int x, int y, int width, int height, String title) {
        super(x, y, width, height, false, title);
        this.windowWidth = width;
        chatLog = new TextArea();
        chatLog.setColors(new CharColor(CharColor.WHITE, CharColor.BLACK));
        textField = new TextField();
        button = new Button("Send");
        button.setShortCut('\n');
        button.addListener(this);

View Full Code Here


 
 
  protected void doPaint() {
    Rectangle rect = getRectangle();
    String text = "< "+_label+" >";
    CharColor colors = hasFocus()?getFocusedButtonColors():getColors();
    Toolkit.printString(text,rect, colors);
    if (!hasFocus()) {
      drawShortCutIfNeeded();
    }
  }
View Full Code Here

    return false;
  }
 
 
  private void changeColors() {
    CharColor colors = hasFocus()?getFocusedButtonColors():getColors();
    Toolkit.changeColors(getRectangle(),colors);
  }
View Full Code Here

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

    return false;
  }
 
 
  private void changeColors() {
    CharColor colors = hasFocus()?getFocusedCheckboxColors():getColors();
    Toolkit.changeColors(getRectangle(),colors);
  }
View Full Code Here

  }
 
 
  private void paintTitle() {
    if (_title!=null) {
      CharColor color = getTitleColors();
      Toolkit.printString( _title, _rect.getX()+(_rect.getWidth()-_title.length())/2,_rect.getY(), color);
    }
  }
View Full Code Here

    int y = rect.getY()+1+index-_startIndex;
    int width = rect.getWidth()-2;
    Rectangle itemRect = new Rectangle(x,y,width,1);
    boolean toSelect = (((index == _trackedIndex) && hasFocus()) ||
              (isSelected(index)));
    CharColor colors = toSelect?getSelectedItemColors():getColors();
    Toolkit.changeColors(itemRect,colors);
   
  }
View Full Code Here

    int y = rect.getY()+1+index-_startIndex;
    int width = rect.getWidth()-2;
    boolean toSelect = (((index == _trackedIndex) && hasFocus()) ||
              (isSelected(index)));
             
    CharColor colors = toSelect?getSelectedItemColors():getColors();
   
    String item = getItemRepresentation((String)_items.get(index));
    if (item.length() < (_startPos +1)) {
      item = "";
    } else {
View Full Code Here

    return getColors();
  }
 
 
  public CharColor getScrollbarColors() {
    CharColor colors = new CharColor(getColors().getForeground(),getColors().getBackground());
    colors.setBlackWhiteAttribute((colors.getBlackWhiteAttribute() == CharColor.REVERSE)?CharColor.NORMAL:CharColor.REVERSE);
    return colors;
  }
View Full Code Here

 
  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

TOP

Related Classes of jcurses.system.CharColor

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.