コード例 #1
0
 void createHandle() {
   super.createHandle();
   state |= THEME_BACKGROUND;
   if (OS.COMCTL32_MAJOR < 6) {
     layout = new TextLayout(display);
     if (!OS.IsWinCE && OS.WIN32_VERSION >= OS.VERSION(4, 10)) {
       linkColor = Color.win32_new(display, OS.GetSysColor(OS.COLOR_HOTLIGHT));
     } else {
       linkColor = new Color(display, LINK_FOREGROUND);
     }
     disabledColor = Color.win32_new(display, OS.GetSysColor(OS.COLOR_GRAYTEXT));
     offsets = new Point[0];
     ids = new String[0];
     mnemonics = new int[0];
     selection = new Point(-1, -1);
     focusIndex = mouseDownIndex = -1;
   }
 }
コード例 #2
0
 void releaseWidget() {
   super.releaseWidget();
   if (layout != null) layout.dispose();
   layout = null;
   if (linkColor != null) linkColor.dispose();
   linkColor = null;
   disabledColor = null;
   offsets = null;
   ids = null;
   mnemonics = null;
   text = null;
 }
コード例 #3
0
 public void setBackground(Color color) {
   super.setBackground(color);
   // Are these settings the same as before?
   if (backgroundImage == null && gradientColors == null && gradientPercents == null) {
     if (color == null) {
       if (background == null) return;
     } else {
       if (color.equals(background)) return;
     }
   }
   background = color;
   backgroundImage = null;
   gradientColors = null;
   gradientPercents = null;
   redraw();
 }