當前位置: 首頁>>代碼示例>>Java>>正文


Java Figure.setBackgroundColor方法代碼示例

本文整理匯總了Java中org.eclipse.draw2d.Figure.setBackgroundColor方法的典型用法代碼示例。如果您正苦於以下問題:Java Figure.setBackgroundColor方法的具體用法?Java Figure.setBackgroundColor怎麽用?Java Figure.setBackgroundColor使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.eclipse.draw2d.Figure的用法示例。


在下文中一共展示了Figure.setBackgroundColor方法的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);
}
 
開發者ID:roundrop,項目名稱:ermasterr,代碼行數:23,代碼來源:SimpleStyleSupport.java

示例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);
}
 
開發者ID:kozake,項目名稱:ermaster-k,代碼行數:23,代碼來源:SimpleStyleSupport.java

示例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);
}
 
開發者ID:dbflute-session,項目名稱:erflute,代碼行數:20,代碼來源:SimpleStyleSupport.java

示例4: 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);
}
 
開發者ID:winture,項目名稱:wt-studio,代碼行數:28,代碼來源:ViewModelFigure.java

示例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.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);
}
 
開發者ID:winture,項目名稱:wt-studio,代碼行數:27,代碼來源:TableModelFigure.java

示例6: 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);
}
 
開發者ID:winture,項目名稱:wt-studio,代碼行數:19,代碼來源:TableModelFigure.java

示例7: 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;
}
 
開發者ID:subclipse,項目名稱:subclipse,代碼行數:15,代碼來源:BranchEditPart.java

示例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);

	return f;
}
 
開發者ID:subclipse,項目名稱:subclipse,代碼行數:11,代碼來源:GraphEditPart.java

示例9: 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;
}
 
開發者ID:subclipse,項目名稱:subclipse,代碼行數:16,代碼來源:PathEditPart.java

示例10: 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);
}
 
開發者ID:roundrop,項目名稱:ermasterr,代碼行數:30,代碼來源:FunnyStyleSupport.java

示例11: 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);
}
 
開發者ID:kozake,項目名稱:ermaster-k,代碼行數:30,代碼來源:FunnyStyleSupport.java

示例12: 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);
}
 
開發者ID:dbflute-session,項目名稱:erflute,代碼行數:29,代碼來源:FunnyStyleSupport.java

示例13: createFigure

import org.eclipse.draw2d.Figure; //導入方法依賴的package包/類
@Override
protected IFigure createFigure() {
	Figure figure = new Figure();
	ToolbarLayout layout = new ToolbarLayout();
	layout.setSpacing(2);
	figure.setLayoutManager(layout);
	figure.setOpaque(true);
	figure.setBackgroundColor(ColorConstants.white);
	figure.setMinimumSize(new Dimension(0, getModel().getMinimumHeight()));
	return figure;
}
 
開發者ID:nasa,項目名稱:OpenSPIFe,代碼行數:12,代碼來源:ChartHeaderEditPart.java

示例14: showLayoutTargetFeedback

import org.eclipse.draw2d.Figure; //導入方法依賴的package包/類
/**
 * {@inheritDoc} In this case the backround color changes to blue when the user is about to
 * execute a possible command.
 */
@Override
protected void showLayoutTargetFeedback(final Request request) {
  if (request.getType() == RequestConstants.REQ_CREATE) {
    if (((CreateRequest) request).getNewObjectType().equals(Type.ROLE_TYPE)
        || ((CreateRequest) request).getNewObjectType().equals(Type.COMPARTMENT_TYPE)
        || ((CreateRequest) request).getNewObjectType().equals(Type.NATURAL_TYPE)
        || ((CreateRequest) request).getNewObjectType().equals(Type.ROLE_GROUP)) {

      final Figure figure = (Figure) getHostFigure();
      figure.setBackgroundColor(ColorConstants.lightBlue);
      figure.setOpaque(true);
    }
  }
}
 
開發者ID:leondart,項目名稱:FRaMED,代碼行數:19,代碼來源:ORMModelXYLayoutPolicy.java

示例15: eraseLayoutTargetFeedback

import org.eclipse.draw2d.Figure; //導入方法依賴的package包/類
/** {@inheritDoc} */
@Override
protected void eraseLayoutTargetFeedback(final Request request) {
  final Figure figure = (Figure) getHostFigure();
  figure.setBackgroundColor(ColorConstants.white);
  figure.setOpaque(false);
}
 
開發者ID:leondart,項目名稱:FRaMED,代碼行數:8,代碼來源:ORMModelXYLayoutPolicy.java


注:本文中的org.eclipse.draw2d.Figure.setBackgroundColor方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。