protected void drawAbsoluteString( LGraphics g, String value, int row, int col, int rowNum, int colNum) { int cellWidth = (scaledWidth - 2 * PADDING_X) / colNum; int cellHeight = (scaledHeight - 2 * PADDING_Y) / rowNum; int absoluteX = x + PADDING_X + col * cellWidth; int absoluteY = y + PADDING_Y + row * cellHeight + (cellHeight - g.getFont().getSize()) / 2; if (getCurWidth(row) > 0) absoluteX = getCurWidth(row) + 5; g.drawString(value, absoluteX, absoluteY + g.getFont().getSize()); setCurWidth(row, absoluteX + g.getFont().stringWidth(value)); }
protected void createCustomUI(LGraphics g, int x, int y, int w, int h) { if (visible) { if (image == null) { wait.draw(g, x, y, w, h); } else { g.drawImage(image, x, y, w, h); } } }
protected void drawAbsoluteImage( LGraphics g, LImage image, int row, int col, int width, int height, int rowNum, int colNum) { int cellWidth = (scaledWidth - 2 * PADDING_X) / colNum; int cellHeight = (scaledHeight - 2 * PADDING_Y) / rowNum; int absoluteX = x + PADDING_X + col * cellWidth; int absoluteY = y + PADDING_Y + row * cellHeight + (cellHeight - height) / 2; if (getCurWidth(row) > 0) absoluteX = getCurWidth(row) + 5; g.drawImage( image, absoluteX, absoluteY, absoluteX + width, absoluteY + height, 0, 0, width, height); setCurWidth(row, absoluteX + width); }
public void draw(LGraphics g) { if (!isShown) return; if (img != null) { // if (!MainScreen.instance.isShownLeftPanel) { // g.drawImage(img, x, y, x + scaledWidth, y + scaledHeight, 0, 0, // scaledWidth, scaledHeight); // } else { // g.drawImage(img1, x, y, x + scaledWidth, y + scaledHeight, 0, // 0, scaledWidth, scaledHeight); // } g.drawImage(img, x, y, x + scaledWidth, y + scaledHeight, 0, 0, scaledWidth, scaledHeight); } }
protected void drawAbsoluteImageEx( LGraphics g, LImage image, int x, int y, int width, int height) { g.drawImage( image, x + this.x, y + this.y, x + this.x + width, y + this.y + height, 0, 0, width, height); }
protected void drawString(LGraphics g, String message, int x, int y) { g.drawString(message, x + this.x, y + this.y + g.getFont().getSize()); }
protected void drawRect(LGraphics g, int x, int y, int w, int h) { g.drawRect(x + this.x, y + this.y, w, h); }
protected void drawAbsoluteStringEx(LGraphics g, String value, int x, int y) { g.drawString(value, x + this.x, y + this.y + g.getFont().getSize()); }