Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Runtime

org.eclipse.gmf.runtime.draw2d.ui.figures
Class RoundedRectangleBorder

java.lang.Object
  extended by 

org.eclipse.draw2d.AbstractBorder
      extended by 

org.eclipse.draw2d.LineBorder
          extended by 
org.eclipse.gmf.runtime.draw2d.ui.figures.RoundedRectangleBorder
All Implemented Interfaces:
Border

public class RoundedRectangleBorder
extends LineBorder

Extends LineBorder to replace rectangular border with rounded rectangle.

Since:
1.2

Field Summary
 
Fields inherited from class org.eclipse.draw2d. AbstractBorder
tempRect
 
Constructor Summary
RoundedRectangleBorder (int arcWidth, int arcHeight)
          Creates an instance of this class with the given arc width and arc height in pixels
 
Method Summary
 int getArcHeight ()
          Gets the arc height.
 int getArcWidth ()
          Gets the arc width.
  Insets getInsets ( IFigure figure)
          Insets are defined by the line width.
 void paint ( IFigure figure, Graphics graphics, Insets insets)
          Paints rounded rectangular border taking into account arcWidth, arcHeight, line width and line style
 void setArcHeight (int arcHeight)
          Sets the arc height
 void setArcWidth (int arcWidth)
          Sets the arc width
 
Methods inherited from class org.eclipse.draw2d. LineBorder
getColor, getStyle, getWidth, isOpaque, setColor, setStyle, setWidth
 
Methods inherited from class org.eclipse.draw2d. AbstractBorder
getPaintRectangle, getPreferredSize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RoundedRectangleBorder

public RoundedRectangleBorder(int arcWidth,
                              int arcHeight)
Creates an instance of this class with the given arc width and arc height in pixels

Parameters:
arcWidth - The width of the corner arc
arcHeight - The height of the corner arc
Method Detail

getInsets

public 
Insets getInsets(
IFigure figure)
Insets are defined by the line width.

Specified by:
getInsets in interface Border
Overrides:
getInsets in class LineBorder
See Also:
LineBorder.getInsets(org.eclipse.draw2d.IFigure)

getArcWidth

public int getArcWidth()
Gets the arc width.

Returns:
arc width

setArcWidth

public void setArcWidth(int arcWidth)
Sets the arc width

Parameters:
arcWidth -

getArcHeight

public int getArcHeight()
Gets the arc height.

Returns:
arc height

setArcHeight

public void setArcHeight(int arcHeight)
Sets the arc height

Parameters:
arcHeight -

paint

public void paint(
IFigure figure,
                  
Graphics graphics,
                  
Insets insets)
Paints rounded rectangular border taking into account arcWidth, arcHeight, line width and line style

Specified by:
paint in interface Border
Overrides:
paint in class LineBorder
See Also:
LineBorder.paint(org.eclipse.draw2d.IFigure, org.eclipse.draw2d.Graphics, org.eclipse.draw2d.geometry.Insets)

Runtime

Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire