本文整理匯總了Java中org.eclipse.draw2d.Figure.setOpaque方法的典型用法代碼示例。如果您正苦於以下問題:Java Figure.setOpaque方法的具體用法?Java Figure.setOpaque怎麽用?Java Figure.setOpaque使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.eclipse.draw2d.Figure
的用法示例。
在下文中一共展示了Figure.setOpaque方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: initTitleBar
import org.eclipse.draw2d.Figure; //導入方法依賴的package包/類
/**
* {@inheritDoc}
*/
@Override
public void initTitleBar(final Figure top) {
final ToolbarLayout topLayout = new ToolbarLayout();
topLayout.setMinorAlignment(OrderedLayout.ALIGN_TOPLEFT);
topLayout.setStretchMinorAxis(true);
top.setLayoutManager(topLayout);
nameLabel = new Label();
nameLabel.setBorder(new MarginBorder(new Insets(5, 20, 5, 20)));
top.add(nameLabel);
final Figure separater = new Figure();
separater.setSize(-1, 1);
separater.setBackgroundColor(getTextColor());
separater.setOpaque(true);
top.add(separater);
}
示例2: initTitleBar
import org.eclipse.draw2d.Figure; //導入方法依賴的package包/類
/**
* {@inheritDoc}
*/
@Override
public void initTitleBar(Figure top) {
ToolbarLayout topLayout = new ToolbarLayout();
topLayout.setMinorAlignment(ToolbarLayout.ALIGN_TOPLEFT);
topLayout.setStretchMinorAxis(true);
top.setLayoutManager(topLayout);
this.nameLabel = new Label();
this.nameLabel.setBorder(new MarginBorder(new Insets(5, 20, 5, 20)));
top.add(nameLabel);
Figure separater = new Figure();
separater.setSize(-1, 1);
separater.setBackgroundColor(this.getTextColor());
separater.setOpaque(true);
top.add(separater);
}
示例3: initTitleBar
import org.eclipse.draw2d.Figure; //導入方法依賴的package包/類
@Override
public void initTitleBar(Figure top) {
final ToolbarLayout topLayout = new ToolbarLayout();
topLayout.setMinorAlignment(ToolbarLayout.ALIGN_TOPLEFT);
topLayout.setStretchMinorAxis(true);
top.setLayoutManager(topLayout);
this.nameLabel = new Label();
nameLabel.setBorder(new MarginBorder(new Insets(5, 20, 5, 20)));
top.add(nameLabel);
final Figure separater = new Figure();
separater.setSize(-1, 1);
separater.setBackgroundColor(getTextColor());
separater.setOpaque(true);
top.add(separater);
}
示例4: createFigure
import org.eclipse.draw2d.Figure; //導入方法依賴的package包/類
protected IFigure createFigure( )
{
Figure figure = new FirstCellFigure();
contentPane = new Figure();
ReportFlowLayout rflayout = new ReportFlowLayout( )
{
public void layout( IFigure parent )
{
super.layout( parent );
}
};
contentPane.setLayoutManager( rflayout );
contentPane.setOpaque( false );
figure.add( contentPane );
controlFigure = new ControlFigure(this, new NothingLocator());
figure.add( controlFigure );
return figure;
}
示例5: initTitleBar
import org.eclipse.draw2d.Figure; //導入方法依賴的package包/類
/**
* {@inheritDoc}
*/
public void initTitleBar(Figure top) {
top.setLayoutManager(new BorderLayout());
Figure title = new Figure();
top.add(title, BorderLayout.TOP);
title.setLayoutManager(new FlowLayout());
title.setBackgroundColor(ColorConstants.darkGreen);
ImageFigure image = new ImageFigure();
image.setBorder(new MarginBorder(new Insets(5, 10, 5, 2)));
image.setImage(Activator.getImageDescriptor(ImageResource.VIEW).createImage());
title.add(image);
this.nameLabel = new Label();
this.nameLabel.setBorder(new MarginBorder(new Insets(5, 0, 5, 20)));
title.add(this.nameLabel);
Figure separater = new Figure();
separater.setSize(-1, 1);
separater.setBackgroundColor(ColorConstants.black);
separater.setOpaque(true);
top.add(separater, BorderLayout.BOTTOM);
}
示例6: initTitleBar
import org.eclipse.draw2d.Figure; //導入方法依賴的package包/類
/**
* {@inheritDoc}
*/
public void initTitleBar(Figure top) {
top.setLayoutManager(new BorderLayout());
Figure title = new Figure();
top.add(title, BorderLayout.TOP);
title.setLayoutManager(new FlowLayout());
title.setBackgroundColor(ColorConstants.darkGreen);
ImageFigure image = new ImageFigure();
image.setBorder(new MarginBorder(new Insets(5, 10, 5, 2)));
image.setImage(Activator.getImageDescriptor(ImageResource.TABLE).createImage());
title.add(image);
this.nameLabel = new Label();
this.nameLabel.setBorder(new MarginBorder(new Insets(5, 0, 5, 20)));
title.add(this.nameLabel);
Figure separater = new Figure();
separater.setSize(100, 100);
separater.setBackgroundColor(ColorConstants.black);
separater.setOpaque(false);
top.add(separater, BorderLayout.BOTTOM);
}
示例7: createColumnArea
import org.eclipse.draw2d.Figure; //導入方法依賴的package包/類
/**
* {@inheritDoc}
*/
public void createColumnArea() {
columns=new Figure();
this.initColumnArea(columns);
columns.setBorder(new MarginBorder(0, 0, 0, 0));
columns.setBackgroundColor(ColorConstants.white);
columns.setOpaque(true);
Figure centerFigure = new Figure();
centerFigure.setLayoutManager(new BorderLayout());
centerFigure.setBorder(new MarginBorder(new Insets(0, 2, 0, 2)));
centerFigure.setBackgroundColor(new Color(null,192,192,192));
centerFigure.add(columns, BorderLayout.CENTER);
this.add(centerFigure, BorderLayout.CENTER);
}
示例8: createFigure
import org.eclipse.draw2d.Figure; //導入方法依賴的package包/類
protected IFigure createFigure() {
Figure f = new Figure();
f.setBackgroundColor(ColorConstants.white);
f.setOpaque(true);
XYLayout layout = new XYLayout();
f.setLayoutManager(layout);
Branch branch = (Branch)getModel();
Rectangle rect = new Rectangle(10+branch.getIndex()*BRANCH_OFFSET, 10, BRANCH_WIDTH, -1);
((AbstractGraphicalEditPart)getParent()).getFigure().getLayoutManager().setConstraint(f, rect);
return f;
}
示例9: createFigure
import org.eclipse.draw2d.Figure; //導入方法依賴的package包/類
protected IFigure createFigure() {
Figure f = new Figure();
f.setBackgroundColor(ColorConstants.white);
f.setOpaque(true);
XYLayout layout = new XYLayout();
f.setLayoutManager(layout);
return f;
}
示例10: createFigure
import org.eclipse.draw2d.Figure; //導入方法依賴的package包/類
protected IFigure createFigure() {
Figure f = new Figure();
f.setBackgroundColor(ColorConstants.white);
f.setOpaque(true);
BorderLayout layout = new BorderLayout();
f.setLayoutManager(layout);
Path path = (Path)getModel();
GraphEditPart graphEditPart = (GraphEditPart)getParent().getParent();
branchFigure = graphEditPart.getBranchFigure(path.getPath());
f.add(branchFigure, BorderLayout.CENTER);
return f;
}
示例11: initTitleBar
import org.eclipse.draw2d.Figure; //導入方法依賴的package包/類
/**
* {@inheritDoc}
*/
@Override
public void initTitleBar(final Figure top) {
top.setLayoutManager(new BorderLayout());
final Figure title = new Figure();
top.add(title, BorderLayout.TOP);
final FlowLayout titleLayout = new FlowLayout();
titleLayout.setMinorAlignment(OrderedLayout.ALIGN_CENTER);
title.setLayoutManager(titleLayout);
final ImageFigure image = new ImageFigure();
image.setBorder(new MarginBorder(new Insets(5, 10, 5, 2)));
image.setImage(ERDiagramActivator.getImage(getTableFigure().getImageKey()));
title.add(image);
nameLabel = new Label();
nameLabel.setBorder(new MarginBorder(new Insets(5, 0, 5, 20)));
title.add(nameLabel);
final Figure separater = new Figure();
separater.setSize(-1, 1);
separater.setBackgroundColor(ColorConstants.black);
separater.setOpaque(true);
top.add(separater, BorderLayout.BOTTOM);
}
示例12: initTitleBar
import org.eclipse.draw2d.Figure; //導入方法依賴的package包/類
/**
* {@inheritDoc}
*/
@Override
public void initTitleBar(Figure top) {
top.setLayoutManager(new BorderLayout());
Figure title = new Figure();
top.add(title, BorderLayout.TOP);
FlowLayout titleLayout = new FlowLayout();
titleLayout.setMinorAlignment(FlowLayout.ALIGN_CENTER);
title.setLayoutManager(titleLayout);
ImageFigure image = new ImageFigure();
image.setBorder(new MarginBorder(new Insets(5, 10, 5, 2)));
image.setImage(ERDiagramActivator.getImage(this.getTableFigure().getImageKey()));
title.add(image);
this.nameLabel = new Label();
this.nameLabel.setBorder(new MarginBorder(new Insets(5, 0, 5, 20)));
title.add(this.nameLabel);
Figure separater = new Figure();
separater.setSize(-1, 1);
separater.setBackgroundColor(ColorConstants.black);
separater.setOpaque(true);
top.add(separater, BorderLayout.BOTTOM);
}
示例13: createFigure
import org.eclipse.draw2d.Figure; //導入方法依賴的package包/類
/**
* @see org.eclipse.gef.editparts.AbstractGraphicalEditPart#createFigure()
*/
@Override
protected IFigure createFigure() {
Figure figure = new FreeformLayer();
figure.setBorder(new MarginBorder(10));
figure.setLayoutManager(new FreeformLayout());
figure.setOpaque(false);
Diagram diagram = null;
if (getModel() instanceof Diagram) {
diagram = (Diagram) getModel();
if (!(diagram.getType().equals(DiagramType.SEQUENCE_DIAGRAM))) {
for (AbstractNode node : diagram.getNodeList()) {
if (node instanceof NotationNode) {
ViewModelUtil.clearGarbageNode(node);
ViewModelUtil.setModelInfo((NotationNode) node);
}
}
for ( AbstractConnection connection : diagram.getConnectionList() ) {
ViewModelUtil.clearGarbageNode(connection);
}
}
}
figure.addLayoutListener(new PrintPreviewLayoutListener());
return figure;
}
示例14: createFigure
import org.eclipse.draw2d.Figure; //導入方法依賴的package包/類
/**
* @see org.eclipse.gef.editparts.AbstractGraphicalEditPart#createFigure()
*/
@Override
protected IFigure createFigure() {
Figure fiugre = new FreeformLayer();
fiugre.setBorder(new MarginBorder(10));
fiugre.setLayoutManager(new FreeformLayout());
fiugre.setOpaque(false);
LayoutManager layout = new ActivityDiagramLayout();
fiugre.setLayoutManager(layout);
return fiugre;
}
示例15: initTitleBar
import org.eclipse.draw2d.Figure; //導入方法依賴的package包/類
@Override
public void initTitleBar(Figure top) {
top.setLayoutManager(new BorderLayout());
final FlowLayout layout = new FlowLayout();
layout.setStretchMinorAxis(true);
final Figure title = new Figure();
top.add(title, BorderLayout.TOP);
title.setLayoutManager(layout);
title.setBorder(new MarginBorder(new Insets(2, 2, 2, 2)));
final ImageFigure image = new ImageFigure();
image.setBorder(new MarginBorder(new Insets(0, 0, 0, 0)));
image.setImage(Activator.getImage(getTableFigure().getImageKey()));
title.add(image);
this.nameLabel = new Label();
nameLabel.setBorder(new MarginBorder(new Insets(0, 0, 0, 20)));
title.add(nameLabel);
final Figure separater = new Figure();
separater.setSize(-1, 1);
separater.setBackgroundColor(ColorConstants.black);
separater.setOpaque(true);
top.add(separater, BorderLayout.BOTTOM);
}