public void paintControls(Graphics g) { Device device = DeviceFactory.getDevice(); g.setColor(backgroundColor); g.fillRect(0, 0, displayRectangle.width, displayPaintable.y); g.fillRect(0, displayPaintable.y, displayPaintable.x, displayPaintable.height); g.fillRect(displayPaintable.x + displayPaintable.width, displayPaintable.y, displayRectangle.width - displayPaintable.x - displayPaintable.width, displayPaintable.height); g.fillRect(0, displayPaintable.y + displayPaintable.height, displayRectangle.width, displayRectangle.height - displayPaintable.y - displayPaintable.height); g.setColor(foregroundColor); for (Enumeration s = device.getSoftButtons().elements(); s.hasMoreElements();) { ((J2SESoftButton) s.nextElement()).paint(g); } int inputMode = device.getInputMethod().getInputMode(); if (inputMode == InputMethod.INPUT_123) { g.drawImage(((J2SEImmutableImage) mode123Image.getImage()).getImage(), mode123Image.getRectangle().x, mode123Image.getRectangle().y, null); } else if (inputMode == InputMethod.INPUT_ABC_UPPER) { g.drawImage(((J2SEImmutableImage) modeAbcUpperImage.getImage()).getImage(), modeAbcUpperImage .getRectangle().x, modeAbcUpperImage.getRectangle().y, null); } else if (inputMode == InputMethod.INPUT_ABC_LOWER) { g.drawImage(((J2SEImmutableImage) modeAbcLowerImage.getImage()).getImage(), modeAbcLowerImage .getRectangle().x, modeAbcLowerImage.getRectangle().y, null); } }
deviceDisplay.setMode123Image(new PositionedImage(loadImage(classLoader, base, tmp_display .getStringAttribute("src")), getRectangle(tmp_display.getChild("paintable")))); } else if (tmp_display.getStringAttribute("type").equals("abc")) { deviceDisplay.setModeAbcLowerImage(new PositionedImage(loadImage(classLoader, base, tmp_display .getStringAttribute("src")), getRectangle(tmp_display.getChild("paintable")))); } else if (tmp_display.getStringAttribute("type").equals("ABC")) { deviceDisplay.setModeAbcUpperImage(new PositionedImage(loadImage(classLoader, base, tmp_display .getStringAttribute("src")), getRectangle(tmp_display.getChild("paintable")))); if (tmp_status.getName().equals("img")) { if (tmp_status.getStringAttribute("name").equals("123")) { deviceDisplay.setMode123Image(new PositionedImage(loadImage(classLoader, base, tmp_status.getStringAttribute("src")), paintable)); } else if (tmp_status.getStringAttribute("name").equals("abc")) { deviceDisplay.setModeAbcLowerImage(new PositionedImage(loadImage(classLoader, base, tmp_status.getStringAttribute("src")), paintable)); } else if (tmp_status.getStringAttribute("name").equals("ABC")) { deviceDisplay.setModeAbcUpperImage(new PositionedImage(loadImage(classLoader, base, tmp_status.getStringAttribute("src")), paintable));
g.drawImage(((SwtImmutableImage) mode123Image.getImage()).getImage(), mode123Image.getRectangle().x, mode123Image.getRectangle().y); } else if (inputMode == InputMethod.INPUT_ABC_UPPER) { g.drawImage(((SwtImmutableImage) modeAbcUpperImage.getImage()).getImage(), modeAbcUpperImage.getRectangle().x, modeAbcUpperImage.getRectangle().y); } else if (inputMode == InputMethod.INPUT_ABC_LOWER) { g.drawImage(((SwtImmutableImage) modeAbcLowerImage.getImage()).getImage(), modeAbcLowerImage.getRectangle().x, modeAbcLowerImage.getRectangle().y);