Package org.eclipse.swt.graphics

Examples of org.eclipse.swt.graphics.GC.fillRectangle()


            } else {
              if (iLastIndex >= INDEX_COLOR_FADEDSTARTS) {
                gcImage.setBackground(Colors.faded[iLastIndex - INDEX_COLOR_FADEDSTARTS]);
              } else
                gcImage.setBackground(Colors.blues[iLastIndex]);
              gcImage.fillRectangle(i - iWidth + x0, y0, iWidth, y1 - y0 + 1);
              iWidth = 1;
              iLastIndex = imageBuffer[i];
            }
          }
          if (iLastIndex >= INDEX_COLOR_FADEDSTARTS)
View Full Code Here


          }
          if (iLastIndex >= INDEX_COLOR_FADEDSTARTS)
            gcImage.setBackground(Colors.faded[iLastIndex - INDEX_COLOR_FADEDSTARTS]);
          else
            gcImage.setBackground(Colors.blues[iLastIndex]);
          gcImage.fillRectangle(x1 - iWidth + 1, y0, iWidth, y1 - y0 + 1);
          bImageChanged = true;
        }
      }

      int limit = (drawWidth * nbComplete) / nbPieces;
View Full Code Here

      }

      int limit = (drawWidth * nbComplete) / nbPieces;
      if (limit < drawWidth) {
        gcImage.setBackground(Colors.blues[Colors.BLUES_LIGHTEST]);
        gcImage.fillRectangle(limit+x0, borderHorizontalSize,
                              x1-limit, completionHeight);
      }
      gcImage.setBackground(Colors.colorProgressBar);
      gcImage.fillRectangle(x0, borderHorizontalSize,
                            limit, completionHeight);
View Full Code Here

        gcImage.setBackground(Colors.blues[Colors.BLUES_LIGHTEST]);
        gcImage.fillRectangle(limit+x0, borderHorizontalSize,
                              x1-limit, completionHeight);
      }
      gcImage.setBackground(Colors.colorProgressBar);
      gcImage.fillRectangle(x0, borderHorizontalSize,
                            limit, completionHeight);
    } catch (Exception e) {
      System.out.println("Error Drawing PiecesItem");
      Debug.printStackTrace( e );
    } } else {
View Full Code Here

      System.out.println("Error Drawing PiecesItem");
      Debug.printStackTrace( e );
    } } else {
        gcImage.setForeground(Colors.grey);
        gcImage.setBackground(Colors.grey);
        gcImage.fillRectangle(x0,y0,newWidth,y1);
    }
    gcImage.dispose();

    Image oldImage = null;
    Graphic graphic = cell.getGraphic();
View Full Code Here

    }
    Image buffer = new Image(display,panelSize.x,panelSize.y);
    GC gcBuffer = new GC(buffer);   
    gcBuffer.setBackground(Colors.white);  
    gcBuffer.setForeground(Colors.blue);
    gcBuffer.fillRectangle(0,0,panelSize.x,panelSize.y);

    if(SWT.getVersion() >= 3138 && antiAliasingAvailable) {
      try {
        //gcBuffer.setTextAntialias(SWT.ON);
        //gcBuffer.setAntialias(SWT.ON);
View Full Code Here

      {
        if (percentDone == 1000)
        {
          gcImage.setForeground(Colors.blues[Colors.BLUES_DARKEST]);
          gcImage.setBackground(Colors.blues[Colors.BLUES_DARKEST]);
          gcImage.fillRectangle(1, 1, newWidth - 2, newHeight - 2);
        } else
        {
          final int firstPiece = fileInfo.getFirstPieceNumber();
          final int nbPieces = fileInfo.getNbPieces();
          final DiskManagerPiece[] dm_pieces = manager.getPieces();
View Full Code Here

                }
              } // for j
            else
              nbAvailable = 1;
            gcImage.setBackground(written ? Colors.red : partially_written ? Colors.grey : Colors.blues[(nbAvailable * Colors.BLUES_DARKEST) / (a1 - a0)]);
            gcImage.fillRectangle(i, 1, 1, newHeight - 2);
            if (written)
              bNoRed = false;
          }
          gcImage.setForeground(Colors.grey);
        }
View Full Code Here

        } else
        {
          gc.setLineWidth(1);
          if (downloading[i])
            gc.setLineStyle(SWT.LINE_DASH);
          gc.fillRectangle(stepWidthX * i + 1, offsetY - 1, barFillingWidth, (int) (Math.ceil(stepWidthY * datasourcePiecesPerAvailability[i] - 1) * -1));
          gc.drawRectangle(stepWidthX * i, offsetY, barWidth, (int) (Math.ceil(stepWidthY * globalPiecesPerAvailability[i]) + 1) * -1);
        }

        if(i==minAvail)
        {
 
View Full Code Here

     
      boxNum++;
      gc.setForeground(Colors.black);
      gc.setBackground(Colors.black);
      gc.drawRectangle(t.x(maxBoxOffsetX),t.y(maxBoxOffsetY*boxNum),maxBoxWidth,charHeight);
      gc.fillRectangle(t.x(maxBoxOffsetX),t.y(maxBoxOffsetY*boxNum),maxBoxWidth/2,charHeight);
      gc.setForeground(Colors.grey);
      gc.setBackground(Colors.background);
      gc.drawString(boxContent[boxNum-1],t.x(maxBoxOffsetX-5),t.y(maxBoxOffsetY*boxNum),true);
     
      if(isMe)
 
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.