Package jcurses.system

Examples of jcurses.system.CharColor


    int left = width - xOffset;
    if (content.length() > left) {
      content = content.substring(0, left);
    }
   
    CharColor colours = ColorList.lookup(string.getColorPair());
    Toolkit.printString(content, this.xOffset + xOffset, this.yOffset + yOffset, colours);
  }
View Full Code Here


    }

    short foreground = getColour(colorPair.getForeground(), CharColor.WHITE);
    short background = getColour(colorPair.getBackground(), CharColor.BLACK);

    CharColor c = new CharColor(background, foreground);
    return c;
  }
View Full Code Here

    int left = width - xOffset;
    if (content.length() > left) {
      content = content.substring(0, left);
    }
   
    CharColor colours = ColorList.lookup(string.getColorPair());
    Toolkit.printString(content, this.xOffset + xOffset, this.yOffset + yOffset, colours);
  }
View Full Code Here

    }
   
    short foreground = getColor(colorPair.getForeground(), CharColor.WHITE);
    short background = getColor(colorPair.getBackground(), CharColor.BLACK);
   
    CharColor c = new CharColor(background, foreground);
    return c;
  }
View Full Code Here

  }
 
 
  private void drawLine(int index) {
    Rectangle rect = getTextRectangle();
    CharColor colors = hasFocus()?getFocusedTextComponentColors():getColors();
    int firstLine = getFirstLineNumber();
    int firstChar = getFirstCharNumber();
    int pos = ((Integer)_lines.get(index)).intValue();
    int length = ((Integer)_lineLengths.get(index)).intValue();
    if ((firstChar < length) && ((index-firstLine) < rect.getHeight())) {
View Full Code Here

    return getPaging().getPageOffset(_cursPosY);
    }
 
 
  private void drawBox(Rectangle rect) {
    CharColor colors = hasFocus()?getFocusedTextComponentColors():getColors();
    Toolkit.drawRectangle(rect, colors);
  }
View Full Code Here

  }
 
 
  private void changeColors() {
    Rectangle rect = getTextRectangle();
    CharColor colors = hasFocus()?getFocusedTextComponentColors():getColors();
    Toolkit.changeColors(rect, colors);
  }
View Full Code Here

    }
  }
 
 
  private void redrawOldChar(int bCursorPosX, int bCursorPosY,char bChar) {
    CharColor colors = hasFocus()?getFocusedTextComponentColors():getColors();
    drawChar(bCursorPosX,bCursorPosY,colors,bChar);
    
  }
View Full Code Here

  protected void doPaint() {
    List<IntRange> intRanges = createIntRanges();
   
    int pos = 0;
    for (IntRange range : intRanges) {
      CharColor color = lookupColor(range);
      Toolkit.drawHorizontalLine(getAbsoluteX(), getAbsoluteY() + pos, getAbsoluteX() + getSize().getWidth(), color);
      pos++;
    }
  }
View Full Code Here

  public static void main(String[] args) {
 
    Window w = new Window(40, 20, true, "Hello World Window");
    DefaultLayoutManager mgr = new DefaultLayoutManager();
    mgr.bindToContainer(w.getRootPanel());
    mgr.addWidget(new Label("Hello World!", new CharColor(CharColor.WHITE, CharColor.GREEN)), 0, 0, 40, 20, WidgetsConstants.ALIGNMENT_CENTER, WidgetsConstants.ALIGNMENT_CENTER);
    w.show();
    Thread.currentThread().sleep(5000);
    w.close();
 
  }
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.