Changeset 3142 for trunk/simexplorer-ide/simexplorer-ide-ant/org.openmole.ui/src/org/openmole/ui/workflow/implementation/paint/BorderedRectangularProvider.java
- Timestamp:
- 03/04/10 12:19:02 (2 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/simexplorer-ide/simexplorer-ide-ant/org.openmole.ui/src/org/openmole/ui/workflow/implementation/paint/BorderedRectangularProvider.java
r2972 r3142 15 15 * along with this program. If not, see <http://www.gnu.org/licenses/>. 16 16 */ 17 18 17 package org.openmole.ui.workflow.implementation.paint; 19 18 … … 25 24 * @author mathieu 26 25 */ 27 public class BorderedRectangularProvider implements IBorderedRectangularProvider {26 public class BorderedRectangularProvider implements IBorderedRectangularProvider { 28 27 29 28 public static final int ARROW_PIN_WIDTH = 15; 30 // public static final int MARGIN_SE_ROUNDED_RECTANGLE = ARROW_PIN_WIDTH * 77 / 100;29 // public static final int MARGIN_SE_ROUNDED_RECTANGLE = ARROW_PIN_WIDTH * 77 / 100; 31 30 public static final int MARGIN_SE_ROUNDED_RECTANGLE = -1; 32 33 31 private Rectangle clipRect; 34 32 private Color backgroundColor; … … 37 35 boolean roundBorder; 38 36 39 public BorderedRectangularProvider(Rectangle rArea, Color baColor, Color boColor, boolean rBorder) {37 public BorderedRectangularProvider(Rectangle rArea, Color baColor, Color boColor, boolean rBorder) { 40 38 backgroundColor = baColor; 41 39 borderColor = boColor; … … 46 44 @Override 47 45 public Color getBorderColor() { 48 return borderColor;46 return borderColor; 49 47 } 50 48 51 49 @Override 52 50 public Color getBackgroundColor() { 53 return backgroundColor; 51 return backgroundColor; 52 } 53 54 @Override 55 public void setBackgroundColor(Color col) { 56 57 backgroundColor = col; 58 } 59 60 @Override 61 public void setBorderColor(Color col) { 62 borderColor = col; 54 63 } 55 64 … … 61 70 @Override 62 71 public Rectangle getClipRect() { 63 // Rectangle clientArea = containerWidget.getClientArea();64 Rectangle gradientRect = new Rectangle();72 // Rectangle clientArea = containerWidget.getClientArea(); 73 Rectangle gradientRect = new Rectangle(); 65 74 66 gradientRect.x = clientArea.x + MARGIN_SE_ROUNDED_RECTANGLE;67 gradientRect.y = clientArea.y;68 gradientRect.width = clientArea.width - MARGIN_SE_ROUNDED_RECTANGLE - MARGIN_SE_ROUNDED_RECTANGLE;69 gradientRect.height = clientArea.height;75 gradientRect.x = clientArea.x + MARGIN_SE_ROUNDED_RECTANGLE; 76 gradientRect.y = clientArea.y; 77 gradientRect.width = clientArea.width - MARGIN_SE_ROUNDED_RECTANGLE - MARGIN_SE_ROUNDED_RECTANGLE; 78 gradientRect.height = clientArea.height; 70 79 71 clipRect = gradientRect;72 return gradientRect;73 }80 clipRect = gradientRect; 81 return gradientRect; 82 } 74 83 75 public Rectangle getClientArea() {84 public Rectangle getClientArea() { 76 85 return clientArea; 77 86 } 78 79 } 87 }





