tmf: Update copyright headers in tmf.ui
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf.ui / src / org / eclipse / linuxtools / tmf / ui / views / uml2sd / drawings / IGC.java
index 32079bba3ec9fd7c3a6301c54eb8bee7d5efc45d..0859add1785add5b1b174ca4ba531bc9b28d7184 100755 (executable)
@@ -1,68 +1,71 @@
 /**********************************************************************
- * Copyright (c) 2005, 2006, 2011 IBM Corporation and others.
+ * Copyright (c) 2005, 2012 IBM Corporation, Ericsson
  * All rights reserved.   This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
- * $Id: IGC.java,v 1.2 2006/09/20 20:56:27 ewchan Exp $
- * 
- * Contributors: 
- * IBM - Initial API and implementation
- * Bernd Hufmann - Updated for TMF
+ *
+ * Contributors:
+ *     IBM - Initial API and implementation
+ *     Bernd Hufmann - Updated for TMF
  **********************************************************************/
+
 package org.eclipse.linuxtools.tmf.ui.views.uml2sd.drawings;
 
 /**
+ * Interface for a graphical context.
+ *
+ * @version 1.0
  * @author sveyrier
- * 
+ *
  */
 public interface IGC {
 
     /**
      * Set the current line style
-     * 
+     *
      * @param style the new line style
      */
     public abstract void setLineStyle(int style);
 
     /**
      * Returns current the line style used in the graphical context
-     * 
+     *
      * @return the current line style
      */
     public abstract int getLineStyle();
 
     /**
      * Returns the contents x coordinate that is at the upper left corner of the view
-     * 
+     *
      * @return the contents x coordinate
      */
     public abstract int getContentsX();
 
     /**
      * Returns the contents y coordinate that is at the upper left corner of the view
-     * 
+     *
      * @return the contents y coordinate
      */
     public abstract int getContentsY();
 
     /**
      * Returns the contents visible width
-     * 
+     *
      * @return the contents width
      */
     public abstract int getVisibleWidth();
 
     /**
      * Returns the contents visible height
-     * 
+     *
      * @return the contents height
      */
     public abstract int getVisibleHeight();
 
     /**
      * Translates the given contents x coordinate into view x coordinate
-     * 
+     *
      * @param x the x coordinate to translate
      * @return the corresponding view x coordinate
      */
@@ -70,7 +73,7 @@ public interface IGC {
 
     /**
      * Translates the given contents y coordinate into view y coordinate
-     * 
+     *
      * @param y the y coordinate to translate
      * @return the corresponding view y coordinate
      */
@@ -78,7 +81,7 @@ public interface IGC {
 
     /**
      * Draws a line, using the foreground color, between the points (x1, y1) and (x2, y2).
-     * 
+     *
      * @param x1 the first point's x coordinate
      * @param y1 the first point's y coordinate
      * @param x2 the second point's x coordinate
@@ -89,7 +92,7 @@ public interface IGC {
     /**
      * Draws the outline of the rectangle specified by the arguments, using the receiver's foreground color. The left
      * and right edges of the rectangle are at x and x + width. The top and bottom edges are at y and y + height.
-     * 
+     *
      * @param x the x coordinate of the rectangle to be drawn
      * @param y the y coordinate of the rectangle to be drawn
      * @param width the width of the rectangle to be drawn
@@ -101,7 +104,7 @@ public interface IGC {
      * Draws a rectangle, based on the specified arguments, which has the appearance of the platform's focus rectangle
      * if the platform supports such a notion, and otherwise draws a simple rectangle in the receiver's foreground
      * color.
-     * 
+     *
      * @param x the x coordinate of the rectangle
      * @param y the y coordinate of the rectangle
      * @param width the width of the rectangle
@@ -114,7 +117,7 @@ public interface IGC {
      * the receiver's background color. The array contains alternating x and y values which are considered to represent
      * points which are the vertices of the polygon. Lines are drawn between each consecutive pair, and between the
      * first pair and last pair in the array.
-     * 
+     *
      * @param points an array of alternating x and y values which are the vertices of the polygon
      */
     public abstract void fillPolygon(int[] points);
@@ -124,14 +127,14 @@ public interface IGC {
      * foreground color. The array contains alternating x and y values which are considered to represent points which
      * are the vertices of the polygon. Lines are drawn between each consecutive pair, and between the first pair and
      * last pair in the array.
-     * 
+     *
      * @param points an array of alternating x and y values which are the vertices of the polygon
      */
     public abstract void drawPolygon(int[] points);
 
     /**
      * Fills the interior of the rectangle specified by the arguments, using the receiver's background color.
-     * 
+     *
      * @param x the x coordinate of the rectangle to be filled
      * @param y the y coordinate of the rectangle to be filled
      * @param width the width of the rectangle to be filled
@@ -142,7 +145,7 @@ public interface IGC {
     /**
      * Fills the interior of the specified rectangle with a gradient sweeping from left to right or top to bottom
      * progressing from the graphical context gradient color to its background color.
-     * 
+     *
      * @param x the x coordinate of the rectangle to be filled
      * @param y the y coordinate of the rectangle to be filled
      * @param width the width of the rectangle to be filled, may be negative (inverts direction of gradient if
@@ -155,7 +158,7 @@ public interface IGC {
 
     /**
      * Returns the given string width in pixels
-     * 
+     *
      * @param name the string
      * @return the string width
      */
@@ -165,7 +168,7 @@ public interface IGC {
      * Draws the given string, using the receiver's current font and foreground color. Tab expansion and carriage return
      * processing are performed. If trans is true, then the background of the rectangular area where the text is being
      * drawn will not be modified, otherwise it will be filled with the receiver's background color.
-     * 
+     *
      * @param string the string to be drawn
      * @param x the x coordinate of the top left corner of the rectangular area where the text is to be drawn
      * @param y the y coordinate of the top left corner of the rectangular area where the text is to be drawn
@@ -177,7 +180,7 @@ public interface IGC {
      * Draws the given string, using the receiver's current font and foreground color. Tab expansion and carriage return
      * processing are performed. The background of the rectangular area where the text is being drawn will be filled
      * with the receiver's background color.
-     * 
+     *
      * @param string the string to be drawn
      * @param x the x coordinate of the top left corner of the rectangular area where the text is to be drawn
      * @param y the y coordinate of the top left corner of the rectangular area where the text is to be drawn
@@ -186,7 +189,7 @@ public interface IGC {
 
     /**
      * Fills the interior of an oval, within the specified rectangular area, with the receiver's background color.
-     * 
+     *
      * @param x the x coordinate of the upper left corner of the oval to be filled
      * @param y the y coordinate of the upper left corner of the oval to be filled
      * @param width the width of the oval to be filled
@@ -196,28 +199,28 @@ public interface IGC {
 
     /**
      * Returns current the background color used in the graphical context
-     * 
+     *
      * @return the background color
      */
     public abstract IColor getBackground();
 
     /**
      * Returns current the background color used in the graphical context
-     * 
+     *
      * @return the background color
      */
     public abstract IColor getForeground();
 
     /**
      * Set the graphical context foreground color
-     * 
+     *
      * @param color the foreground color
      */
     public abstract void setBackground(IColor color);
 
     /**
      * Set the graphical context background color
-     * 
+     *
      * @param color the background color
      */
     public abstract void setForeground(IColor color);
@@ -225,42 +228,42 @@ public interface IGC {
     /**
      * Set the color to use when filling regions using gradient. The color will progess from the given color to the
      * current background color
-     * 
+     *
      * @param color the gardiient color to use
      */
     public abstract void setGradientColor(IColor color);
 
     /**
      * Set the line width to use for drawing
-     * 
+     *
      * @param width the line width
      */
     public abstract void setLineWidth(int width);
 
     /**
      * Returns the current graphical context line width used for drawing
-     * 
+     *
      * @return the line width
      */
     public abstract int getLineWidth();
 
     /**
      * Returns the LineDotD style constant
-     * 
+     *
      * @return the constant value
      */
     public abstract int getLineDotStyle();
 
     /**
      * Returns the LineDash style constant
-     * 
+     *
      * @return the constant
      */
     public abstract int getLineDashStyle();
 
     /**
      * Returns the LineSolid style constant
-     * 
+     *
      * @return the constant
      */
     public abstract int getLineSolidStyle();
@@ -269,41 +272,42 @@ public interface IGC {
      * Draws the given string centered into the given rectangle. If the string cannot fit in the rectangle area, the
      * string is truncated. If trans is true, then the background of the rectangular area where the text is being drawn
      * will not be modified, otherwise it will be filled with the receiver's background color.
-     * 
+     *
      * @param name the string to draw
-     * @param _x the _x coordinate of the rectangle to draw the string
-     * @param _y the _y coordinate of the rectangle to draw the string
+     * @param x the x coordinate of the rectangle to draw the string
+     * @param y the y coordinate of the rectangle to draw the string
      * @param width the width of the rectangle to draw the string
      * @param height the height of the rectangle to draw the string
      * @param trans if true the background will be transparent, otherwise it will be opaque
      */
-    public abstract void drawTextTruncatedCentred(String name, int _x, int _y, int width, int height, boolean trans);
+    public abstract void drawTextTruncatedCentred(String name, int x, int y, int width, int height, boolean trans);
 
     /**
      * Draws the given string into the given rectangle (left justify) If the string cannot fit in the rectangle area,
      * the string is truncated. If trans is true, then the background of the rectangular area where the text is being
      * drawn will not be modified, otherwise it will be filled with the receiver's background color.
-     * 
-     * @param _x the _x coordinate of the rectangle to draw the string
-     * @param _y the _y coordinate of the rectangle to draw the string
+     *
+     * @param name The text to put in the rectangle
+     * @param x the x coordinate of the rectangle to draw the string
+     * @param y the y coordinate of the rectangle to draw the string
      * @param width the width of the rectangle to draw the string
      * @param height the height of the rectangle to draw the string
      * @param trans if true the background will be transparent, otherwise it will be opaque
      */
-    public abstract void drawTextTruncated(String name, int _x, int _y, int width, int height, boolean trans);
+    public abstract void drawTextTruncated(String name, int x, int y, int width, int height, boolean trans);
 
     /**
      * Copies a the source image into a (potentially different sized) rectangular area in the graphical context. If the
      * source image has smaller sizes, then the source area will be stretched to fit the destination area as it is
      * copied.
-     * 
+     *
      * @param image the image to draw
-     * @param _x the x coordinate in the destination to copy to
-     * @param _y the y coordinate in the destination to copy to
+     * @param x the x coordinate in the destination to copy to
+     * @param y the y coordinate in the destination to copy to
      * @param maxWith the width in pixels of the destination rectangle
      * @param maxHeight the height in pixels of the destination rectangle
      */
-    public abstract void drawImage(IImage image, int _x, int _y, int maxWith, int maxHeight);
+    public abstract void drawImage(IImage image, int x, int y, int maxWith, int maxHeight);
 
     /**
      * Draws the outline of a circular or elliptical arc within the specified rectangular area. The resulting arc begins
@@ -312,7 +316,7 @@ public interface IGC {
      * value indicates a clockwise rotation. The center of the arc is the center of the rectangle whose origin is (x, y)
      * and whose size is specified by the width and height arguments. The resulting arc covers an area width + 1 pixels
      * wide by height + 1 pixels tall.
-     * 
+     *
      * @param x the x coordinate of the upper-left corner of the arc to be drawn
      * @param y the y coordinate of the upper-left corner of the arc to be drawn
      * @param width the width of the arc to be drawn
@@ -324,30 +328,30 @@ public interface IGC {
 
     /**
      * Set the current font used in the graphical context
-     * 
+     *
      * @param font the font to use
      */
     public abstract void setFont(IFont font);
 
     /**
      * Returns the font height given font
-     * 
-     * @param font
+     *
+     * @param font The font to check for
      * @return the the font height
      */
     public abstract int getFontHeight(IFont font);
 
     /**
      * Returns the average character width for the given font
-     * 
-     * @param font
+     *
+     * @param font The font to check for
      * @return the average width
      */
     public abstract int getFontWidth(IFont font);
 
     /**
      * Creates a color with the given RGB values
-     * 
+     *
      * @param r the red component
      * @param g the green component
      * @param b the blue component
@@ -357,10 +361,15 @@ public interface IGC {
 
     /**
      * Returns the zoom factor applied in both x and y directions when drawing
-     * 
+     *
      * @return the zoom factor
      */
     public abstract float getZoom();
 
+    /**
+     * Draws text with focus style.
+     *
+     * @param focus <code>true</code> if item has focus else <code>false</code>
+     */
     public abstract void setDrawTextWithFocusStyle(boolean focus);
 }
This page took 0.028252 seconds and 5 git commands to generate.