Exemplo n.º 1
0
 protected void paintToImage(Component c, Image image, Graphics g, int w, int h, Object[] args) {
   Graphics2D g2 = (Graphics2D) g;
   java.util.List gradient = (java.util.List) args[0];
   boolean isVertical = ((Boolean) args[1]).booleanValue();
   // Render to the VolatileImage
   if (isVertical) {
     drawVerticalGradient(
         g2,
         ((Number) gradient.get(0)).floatValue(),
         ((Number) gradient.get(1)).floatValue(),
         (Color) gradient.get(2),
         (Color) gradient.get(3),
         (Color) gradient.get(4),
         w,
         h);
   } else {
     drawHorizontalGradient(
         g2,
         ((Number) gradient.get(0)).floatValue(),
         ((Number) gradient.get(1)).floatValue(),
         (Color) gradient.get(2),
         (Color) gradient.get(3),
         (Color) gradient.get(4),
         w,
         h);
   }
 }
  public void tabRemoveHighlight(int tabIndex) {
    Iterator<Integer> highlightedIter = highlightedTabs.iterator();

    while (highlightedIter.hasNext()) {
      if (highlightedIter.next().intValue() == tabIndex) {
        highlightedIter.remove();
        break;
      }
    }
  }
 public boolean isTabHighlighted(int tabIndex) {
   return highlightedTabs.contains(tabIndex);
 }