本文整理汇总了Java中org.eclipse.draw2d.RoundedRectangle类的典型用法代码示例。如果您正苦于以下问题:Java RoundedRectangle类的具体用法?Java RoundedRectangle怎么用?Java RoundedRectangle使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
RoundedRectangle类属于org.eclipse.draw2d包,在下文中一共展示了RoundedRectangle类的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createTargetValue
import org.eclipse.draw2d.RoundedRectangle; //导入依赖的package包/类
private IFigure createTargetValue ()
{
this.targetRect = new RoundedRectangle ();
this.targetRect.setLayoutManager ( new BorderLayout () );
this.targetRect.setBackgroundColor ( ColorConstants.lightGray );
this.targetRect.setForegroundColor ( ColorConstants.black );
this.targetRect.setBorder ( new MarginBorder ( 10 ) );
this.targetRect.add ( this.targetLabel = new Label (), BorderLayout.CENTER );
return this.targetRect;
}
示例2: createSourceValue
import org.eclipse.draw2d.RoundedRectangle; //导入依赖的package包/类
private IFigure createSourceValue ()
{
this.sourceRect = new RoundedRectangle ();
this.sourceRect.setLayoutManager ( new BorderLayout () );
this.sourceRect.setBackgroundColor ( ColorConstants.lightGray );
this.sourceRect.setForegroundColor ( ColorConstants.black );
this.sourceRect.setBorder ( new MarginBorder ( 10 ) );
this.sourceRect.add ( this.sourceLabel = new Label (), BorderLayout.CENTER );
return this.sourceRect;
}
示例3: createRV
import org.eclipse.draw2d.RoundedRectangle; //导入依赖的package包/类
private Figure createRV ()
{
final Figure rvFigure = new Figure ();
rvFigure.setLayoutManager ( new BorderLayout () );
final Label label = new Label ( Messages.ManualOverride_ResetValue_Label );
label.setBorder ( new MarginBorder ( 10 ) );
rvFigure.add ( label, BorderLayout.RIGHT );
this.rvRect = new RoundedRectangle ();
this.rvRect.setLayoutManager ( new BorderLayout () );
this.rvValue = new Label ();
this.rvRect.setBackgroundColor ( ColorConstants.lightGray );
this.rvValue.setBorder ( new MarginBorder ( 10 ) );
this.rvRect.add ( this.rvValue, BorderLayout.CENTER );
this.rvRectBlinker = new StyleBlinker () {
@Override
public void update ( final CurrentStyle style )
{
ManualOverride.this.rvRect.setBackgroundColor ( style.background );
ManualOverride.this.rvRect.setForegroundColor ( style.foreground );
ManualOverride.this.rvRect.setFont ( style.font );
}
};
this.rvRectStyler = new StateStyler ( this.rvRectBlinker );
rvFigure.add ( this.rvRect, BorderLayout.CENTER );
return rvFigure;
}
示例4: createLayout
import org.eclipse.draw2d.RoundedRectangle; //导入依赖的package包/类
protected void createLayout() {
setLayoutManager(new XYLayout());
setBackgroundColor(Activator.getVertexImageColor());
setOpaque(true);
setBorder(null);
rectangle = new RoundedRectangle();
add(rectangle);
name = new Label("");
add(name);
}
示例5: createLayout
import org.eclipse.draw2d.RoundedRectangle; //导入依赖的package包/类
protected void createLayout () {
setLayoutManager(new XYLayout());
setBackgroundColor(Activator.getSharedVertexImageColor());
setOpaque(true);
this.setBorder(null);
rectangle = new RoundedRectangle();
add(rectangle);
name = new Label("");
add(name);
}
示例6: createPositionsFig
import org.eclipse.draw2d.RoundedRectangle; //导入依赖的package包/类
private RoundedRectangle createPositionsFig() {
RoundedRectangle fig = new RoundedRectangle();
fig.setOpaque(false);
fig.setCornerDimensions(PandionJConstants.OBJECT_CORNER);
fig.setBackgroundColor(PandionJConstants.Colors.OBJECT);
GridLayout layout = new GridLayout(horizontal ? (model.getLength() > PandionJView.getMaxArrayLength() ? N + 1 : Math.max(1, N)) : 1, false);
layout.verticalSpacing = 0;
layout.horizontalSpacing = PandionJConstants.ARRAY_POSITION_SPACING;
layout.marginWidth = PandionJConstants.ARRAY_MARGIN;
layout.marginHeight = PandionJConstants.ARRAY_MARGIN;
fig.setLayoutManager(layout);
fig.setToolTip(new Label("length = " + model.getLength()));
if(N == 0) {
Label empty = new Label("");
GridData layoutData = new GridData(POSITION_WIDTH/2, POSITION_WIDTH);
layout.setConstraint(empty, layoutData);
fig.add(empty);
}
else {
Iterator<Integer> it = model.getValidModelIndexes();
while(it.hasNext()) {
Integer i = it.next();
if(!it.hasNext() && model.getLength() > PandionJView.getMaxArrayLength()) {
Position emptyPosition = new Position(null);
fig.add(emptyPosition);
}
Position p = new Position(i);
fig.add(p);
positions.add(p);
}
}
return fig;
}
示例7: getFeedbackFigure
import org.eclipse.draw2d.RoundedRectangle; //导入依赖的package包/类
private IFigure getFeedbackFigure() {
if (feedbackFigure == null) {
final RoundedRectangle pl = new RoundedRectangle();
pl.setForegroundColor(ColorConstants.black);
pl.setBackgroundColor(ColorConstants.black);
pl.setBounds(getFeedbackFigureBounds());
feedbackFigure = pl;
}
return feedbackFigure;
}
示例8: createFigure
import org.eclipse.draw2d.RoundedRectangle; //导入依赖的package包/类
@Override
protected IFigure createFigure() {
RoundedRectangle fig = new RoundedRectangle() {
@Override
public Insets getInsets() {
return INSETS;
}
};
fig.setLayoutManager(new FromLayout());
fig.setBackgroundColor(SWTResourceManager.getColor(248, 248, 255));
fig.setOpaque(true);
return fig;
}
示例9: refreshVisuals
import org.eclipse.draw2d.RoundedRectangle; //导入依赖的package包/类
protected void refreshVisuals() {
RoundedRectangle f = (RoundedRectangle) getFigure();
setupLayoutManager();
MFrom mfrom = getModel();
getFigure().setToolTip(new Label(QueryWriter.writeSubQuery(mfrom.getParent())));
AbstractGraphicalEditPart parent = (AbstractGraphicalEditPart) getParent();
Point location = f.getLocation();
if (mfrom.getPropertyActualValue(MFromTable.PROP_X) != null)
location.x = (Integer) mfrom.getPropertyValue(MFromTable.PROP_X);
if (mfrom.getPropertyActualValue(MFromTable.PROP_Y) != null)
location.y = (Integer) mfrom.getPropertyValue(MFromTable.PROP_Y);
parent.setLayoutConstraint(this, f, new Rectangle(location.x, location.y, -1, -1));
}
示例10: customizeFigure
import org.eclipse.draw2d.RoundedRectangle; //导入依赖的package包/类
protected void customizeFigure() {
this.rectangle = new RoundedRectangle();
this.rectangle.setCornerDimensions(new Dimension(25, 25));
add(this.rectangle, 0);
setSize(92, 52);
setSelected(false);
}
示例11: ORMRoleGroupFigure
import org.eclipse.draw2d.RoundedRectangle; //导入依赖的package包/类
/**
* The constructor of this class, where the constructor {@link ORMShapeFigure#ORMShapeFigure()}
* is called, the basic {@link RoundedRectangle} is initialized and the
* child figure for the name( {@link Label}) is added to the basic rectangle.
* */
public ORMRoleGroupFigure() {
super();
rectangle = new RoundedRectangle();
setLayoutManager(new BorderLayout());
setBackgroundColor(ColorConstants.white);
BorderLayout layout = new BorderLayout();
layout.setHorizontalSpacing(-1);
layout.setVerticalSpacing(-1);
rectangle.setAntialias(SWT.ON);
rectangle.setLayoutManager(layout);
rectangle.setCornerDimensions(new Dimension(20, 20));
// CODE for dashed rectangle
rectangle.setLineDash(new float[] {5.0f, 5.0f});
rectangle.setLineStyle(SWT.LINE_CUSTOM);
rectangle.setFill(false);
// add name figure
rectangle.add(getLabel(), BorderLayout.TOP);
add(rectangle, BorderLayout.CENTER);
}
示例12: getBasicRec
import org.eclipse.draw2d.RoundedRectangle; //导入依赖的package包/类
/**
* A getter for the basic rectangle of this figure.
*
* @return rectangle {@link ShadowRoundedRectangle}
* */
public RoundedRectangle getBasicRec() {
return rectangle;
}
示例13: createCell
import org.eclipse.draw2d.RoundedRectangle; //导入依赖的package包/类
/**
* {@inheritDoc} Default is a cell with a {@link RoundedRectangle} view.
*
* @see org.modeshape.modeler.ui.FocusTreeView.Preferences#createCell(java.lang.Object)
*/
@Override
public Cell createCell( final Object item ) {
return new Cell( new RoundedRectangle() );
}
示例14: createCell
import org.eclipse.draw2d.RoundedRectangle; //导入依赖的package包/类
/**
* @param item
* an item in the tree
* @return Creates a cell for the supplied item. Must not be <code>null</code>. Default is a {@link RoundedRectangle}.
*/
public IFigure createCell( final Object item ) {
return new RoundedRectangle();
}