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


Java Figure.add方法代碼示例

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


在下文中一共展示了Figure.add方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: createContents

import org.eclipse.draw2d.Figure; //導入方法依賴的package包/類
private static Figure createContents() {
	Figure contents = new Figure();
	XYLayout layout = new XYLayout();
	contents.setLayoutManager(layout);

	Button button = new Button("Hello World");
	layout.setConstraint(button, new Rectangle(0, 0, -1, -1));
	contents.add(button);

	button.addActionListener(new ActionListener() {

		public void actionPerformed(ActionEvent actionevent) {
			setBrightness();
		}
	});

	String path = "C:\\Users\\Public\\Pictures\\Sample Pictures\\Oryx Antelope.jpg";
	image = new Image(Display.getDefault(), path);
	imageFigure = new ImageFigure(image);

	layout.setConstraint(imageFigure, new Rectangle(0, 30, -1, -1));

	contents.add(imageFigure);

	return contents;
}
 
開發者ID:kozake,項目名稱:ermaster-k,代碼行數:27,代碼來源:ImageTest.java

示例2: createMain

import org.eclipse.draw2d.Figure; //導入方法依賴的package包/類
@Override
protected IFigure createMain ()
{
    final Figure rootFigure = new Figure ();

    rootFigure.setLayoutManager ( new GridLayout ( 3, true ) );

    rootFigure.add ( makeHeader (), new GridData ( GridData.BEGINNING, GridData.CENTER, true, false, 3, 1 ) );

    rootFigure.add ( createSourceValue (), new GridData ( GridData.CENTER, GridData.CENTER, true, true ) );
    rootFigure.add ( new Figure () );
    rootFigure.add ( createTargetValue (), new GridData ( GridData.CENTER, GridData.CENTER, true, true ) );

    rootFigure.add ( new Figure () );
    rootFigure.add ( createCommandPanel (), new GridData ( GridData.CENTER, GridData.CENTER, true, true ) );

    createRoundArrow ( rootFigure );

    return rootFigure;
}
 
開發者ID:eclipse,項目名稱:neoscada,代碼行數:21,代碼來源:RoundDetailsPart.java

示例3: createRoundArrow

import org.eclipse.draw2d.Figure; //導入方法依賴的package包/類
private void createRoundArrow ( final Figure figure )
{
    final PolylineConnection c = new PolylineConnection ();
    c.setSourceAnchor ( new ChopboxAnchor ( this.sourceRect ) );
    c.setTargetAnchor ( new ChopboxAnchor ( this.targetRect ) );

    final PolygonDecoration dec = new PolygonDecoration ();
    dec.setTemplate ( PolygonDecoration.TRIANGLE_TIP );
    c.setTargetDecoration ( dec );

    final MidpointLocator typeLocator = new MidpointLocator ( c, 0 );
    typeLocator.setRelativePosition ( PositionConstants.NORTH );
    this.typeLabel = new Label ( "" ); //$NON-NLS-1$
    c.add ( this.typeLabel, typeLocator );

    figure.add ( c );
    this.roundConnection = c;
}
 
開發者ID:eclipse,項目名稱:neoscada,代碼行數:19,代碼來源:RoundDetailsPart.java

示例4: createMain

import org.eclipse.draw2d.Figure; //導入方法依賴的package包/類
@Override
protected IFigure createMain ()
{
    final Figure baseFigure = new LayeredPane ();

    final Layer rootFigure = new Layer ();

    this.connLayer = new ConnectionLayer ();
    this.connLayer.setAntialias ( 1 );
    this.connLayer.setConnectionRouter ( ConnectionRouter.NULL );

    baseFigure.add ( this.connLayer );
    baseFigure.add ( rootFigure );

    rootFigure.setLayoutManager ( new BorderLayout () );
    rootFigure.setBackgroundColor ( ColorConstants.white );

    rootFigure.add ( createArrowFigure (), BorderLayout.RIGHT );
    rootFigure.add ( createEntryGrid ( this.connLayer ), BorderLayout.CENTER );

    return baseFigure;
}
 
開發者ID:eclipse,項目名稱:neoscada,代碼行數:23,代碼來源:GenericLevelPresets.java

示例5: createColumnArea

import org.eclipse.draw2d.Figure; //導入方法依賴的package包/類
/**
 * {@inheritDoc}
 */
@Override
public void createColumnArea(final IFigure columns) {
    initColumnArea(columns);

    columns.setBorder(new MarginBorder(0, 0, 0, 0));
    columns.setBackgroundColor(ColorConstants.white);
    columns.setOpaque(true);

    final Figure centerFigure = new Figure();
    centerFigure.setLayoutManager(new BorderLayout());
    centerFigure.setBorder(new MarginBorder(new Insets(0, 2, 0, 2)));

    centerFigure.add(columns, BorderLayout.CENTER);
    getTableFigure().add(centerFigure, BorderLayout.CENTER);
}
 
開發者ID:roundrop,項目名稱:ermasterr,代碼行數:19,代碼來源:FunnyStyleSupport.java

示例6: 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

示例7: 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

示例8: 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

示例9: createColumnArea

import org.eclipse.draw2d.Figure; //導入方法依賴的package包/類
/**
 * {@inheritDoc}
 */
@Override
public void createColumnArea(IFigure columns) {
	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.add(columns, BorderLayout.CENTER);
	this.getTableFigure().add(centerFigure, BorderLayout.CENTER);
}
 
開發者ID:justinkwony,項目名稱:ermaster-nhit,代碼行數:19,代碼來源:FunnyStyleSupport.java

示例10: 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;
}
 
開發者ID:eclipse,項目名稱:birt,代碼行數:24,代碼來源:CrosstabFirstCellEditPart.java

示例11: 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

示例12: createFooter

import org.eclipse.draw2d.Figure; //導入方法依賴的package包/類
/**
 * {@inheritDoc}
 */
public void createFooter(Figure figure) {
	IFigure footer = new Figure();
	BorderLayout footerLayout = new BorderLayout();
	footer.setLayoutManager(footerLayout);
	footer.setBorder(new MarginBorder(new Insets(0, 2, 0, 2)));

	IFigure footer1 = new Figure();
	footer1.setSize(-1, 10);
	footer1.setBackgroundColor(VERY_LIGHT_GRAY);
	footer1.setOpaque(true);

	footer.add(footer1, BorderLayout.TOP);

	IFigure footer2 = new Figure();
	footer2.setSize(-1, 7);

	footer.add(footer2, BorderLayout.BOTTOM);

	figure.add(footer, BorderLayout.BOTTOM);
}
 
開發者ID:winture,項目名稱:wt-studio,代碼行數:24,代碼來源:ViewModelFigure.java

示例13: 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

示例14: 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

示例15: createFooter

import org.eclipse.draw2d.Figure; //導入方法依賴的package包/類
/**
 * {@inheritDoc}
 */
public void createFooter(Figure figure) {
	IFigure footer = new Figure();
	BorderLayout footerLayout = new BorderLayout();
	footer.setLayoutManager(footerLayout);
	footer.setBorder(new MarginBorder(new Insets(0, 2, 0, 2)));

	IFigure footer1 = new Figure();
	footer1.setSize(-1, 10);
	footer1.setBackgroundColor(VERY_LIGHT_GRAY);
	footer1.setOpaque(true);

	footer.add(footer1, BorderLayout.TOP);

	IFigure footer2 = new Figure();
	footer2.setSize(-1, 7);
	footer.add(footer2, BorderLayout.BOTTOM);
	figure.add(footer, BorderLayout.BOTTOM);
}
 
開發者ID:winture,項目名稱:wt-studio,代碼行數:22,代碼來源:TableModelFigure.java


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