Package org.eclipse.swt.graphics

Examples of org.eclipse.swt.graphics.Color.dispose()


        if(addedGlobalListener)
        {
          shell.getDisplay().removeFilter(SWT.MouseDown, globalListener);
          addedGlobalListener = false;
        }
        c.dispose();
      }
    });
  }

View Full Code Here


          x+7,y+9, x+5,y+7, x+4,y+7, x+2,y+9, x,y+9,
          x,y+7, x+2,y+5, x+2,y+4, x,y+2};
      Color fill = new Color(display, CTabFolder.CLOSE_FILL);
      gc.setBackground(fill);
      gc.fillPolygon(shape);
      fill.dispose();
      gc.setForeground(closeBorder);
      gc.drawPolygon(shape);
      break;
    }
    case CTabFolder.SELECTED: {
View Full Code Here

          x+8,y+10, x+6,y+8, x+5,y+8, x+3,y+10, x+1,y+10,
          x+1,y+8, x+3,y+6, x+3,y+5, x+1,y+3};
      Color fill = new Color(display, CTabFolder.CLOSE_FILL);
      gc.setBackground(fill);
      gc.fillPolygon(shape);
      fill.dispose();
      gc.setForeground(closeBorder);
      gc.drawPolygon(shape);
      break;
    }
    case CTabFolder.NONE: {
View Full Code Here

      int green = from.green + 2*(to.green - from.green)/3;
      int blue = from.blue + 2*(to.blue - from.blue)/3;
      Color color = new Color(getDisplay(), red, green, blue);
      gc.setForeground(color);
      gc.drawPolyline(outer);
      color.dispose();
    }
    if (innerRGB != null) {
      int[] inner = new int[shape.length];
      int index = 0;
      boolean left = true;
View Full Code Here

      int green = from.green + 2*(to.green - from.green)/3;
      int blue = from.blue + 2*(to.blue - from.blue)/3;
      Color color = new Color(getDisplay(), red, green, blue);
      gc.setForeground(color);
      gc.drawPolyline(inner);
      color.dispose();
    }
  }
  public Rectangle computeTrim (int x, int y, int width, int height) {
    checkWidget();
    int trimX = x - marginWidth - highlight_margin - borderLeft;
View Full Code Here

                                found = true;
                                Color color;
                                if (item.getText(i).equals("N�o")) {
                                    color = getDisplay().getSystemColor(SWT.COLOR_LIST_BACKGROUND);
                                    item.setBackground(i, color);
                                    color.dispose();
                                    item.setText(i, "Sim");
                                    String itemChanged = item.getText(1).split(":")[0] + "-" + getDayOfWeek(i);
                                    changedDays.remove(itemChanged);
                                } else {
                                    color = new Color(getDisplay(), 221, 221, 221);
View Full Code Here

                                    item.setBackground(i, color);
                                    item.setText(i, "N�o");
                                    String itemChanged = item.getText(1).split(":")[0] + "-" + getDayOfWeek(i);
                                    changedDays.add(itemChanged);
                                }
                                color.dispose();
                            }
                        }
                        if (item.getBounds(1).contains(point)) {
                            found = true;
                        }
View Full Code Here

                                  changedDays.add(itemChanged);
                                } else {
                                  changedDays.remove(itemChanged);
                                }
                            }
                            color.dispose();
                        }
                    }
                }
                checkItensThatHasACompleteScheduleChecked();
            }
View Full Code Here

                String hour = startWorkTime + x + ":00";
                if (i == 1) {
                    item.setText(i, hour);
                    Color color = Display.getDefault().getSystemColor(SWT.COLOR_WHITE);
                    item.setBackground(i, color);
                    color.dispose();
                } else if (i > 1){
                   String itemText = scheduleMap.get(weekDays[i]).get(hour);
                   Color color;
                   if(itemText == null){
                      color = (new Color(null, 221, 221, 221));
View Full Code Here

                   }else{
                     color = (itemText.equals("Sim")) ? getDisplay().getSystemColor(SWT.COLOR_LIST_BACKGROUND) : new Color(null, 221, 221, 221);
                     item.setText(i,itemText);
                   }
                    item.setBackground(i, color);
                    color.dispose();
                }
            }
        }
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.