Package org.eclipse.swt.graphics

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


              .getHeight());
        }
      }
    }
    if (rgbColor != null) {
      rgbColor.dispose();
    }
    g.restoreState();

    //handle background-image
    Object bgImage = getCSSStyle().getStyleProperty(ICSSPropertyID.ATTR_BACKGROUND_IMAGE);
View Full Code Here


        label = label.substring(0, label.length() - 1);
      }
      g.drawString(label, rect.x + HORIZONTAL_PADDING / 2, rect.y
          + VERTICAL_PADDING / 2);
      if (newColor != null) {
        newColor.dispose();
      }

    }

    BorderUtil.drawBorder(g, rect.x, rect.y, rect.width, rect.height,
View Full Code Here

      // TODO: color registry
            Color fg = FigureUtilities.darker(g.getBackgroundColor());
            g.setForegroundColor(fg);
            g.drawString(_label, imageAreaWidth + GAP, rect.y
          + (rect.height - getLabelHeight()) / 2 + leading);
            fg.dispose();
    }
  }

  /**
   * @return the label text
View Full Code Here

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

    /**
 
View Full Code Here

                RGB rgb = dialog.open();
                if (rgb != null) {
                    Color col = new Color(Display.getCurrent(), rgb);
                    CometeColor cometeColor = ColorTool.getCometeColor(col);
                    theComponent.setCometeBackground(cometeColor);
                    col.dispose();
                    colorList.deselectAll();
                }
            }
        });
View Full Code Here

                ColorDialog dialog = new ColorDialog(IComponentTestPanel.this.getShell());
                RGB rgb = dialog.open();
                if (rgb != null) {
                    Color col = new Color(Display.getCurrent(), rgb);
                    theComponent.setCometeForeground(ColorTool.getCometeColor(col));
                    col.dispose();
                    colorList.deselectAll();
                }
            }
        });
View Full Code Here

        if (!disposed ){
            for(JPowerGraphColor jpgc : colourMap.keySet()){
                Color c = colourMap.get(jpgc);
                colourMap.remove(jpgc);
                if (!c.isDisposed()){
                    c.dispose();
                }
            }
            display = null;
            disposed = true;
        }
View Full Code Here

        | SWT.V_SCROLL);
    final Color detailsBgColor = new Color(null, 255, 255, 255);
    details.setBackground(detailsBgColor);
    details.addDisposeListener(new DisposeListener() {
      public void widgetDisposed(DisposeEvent arg0) {
        detailsBgColor.dispose();
      }
    });

    sash.setWeights(new int[] {80, 20});
View Full Code Here

        .getLongitude());
      gc.drawImage(img, p.getX() - img.getImageData().width / 2, p.getY()
        - img.getImageData().height / 2);
    }
    border.dispose();
    bgcolor.dispose();
  }

  /**
   * @param coordianteSystem
   *            The coordianteSystem to set.
View Full Code Here

    finally {
      if (gc != null)
        gc.dispose();
      black.dispose();
      red.dispose();
      white.dispose();
      high.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.