当前位置: 首页>>代码示例>>Java>>正文


Java LineBorder类代码示例

本文整理汇总了Java中org.eclipse.draw2d.LineBorder的典型用法代码示例。如果您正苦于以下问题:Java LineBorder类的具体用法?Java LineBorder怎么用?Java LineBorder使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


LineBorder类属于org.eclipse.draw2d包,在下文中一共展示了LineBorder类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: MarkerFigure

import org.eclipse.draw2d.LineBorder; //导入依赖的package包/类
public MarkerFigure(String name) {
	ToolbarLayout layout = new ToolbarLayout();
	setLayoutManager(layout);
	setBorder(new LineBorder(ColorConstants.black, 1));
	setBackgroundColor(classColor);
	setOpaque(true);
	org.eclipse.draw2d.Label label = new org.eclipse.draw2d.Label();
	label.setText(name);
	add(label);
	super.setCornerDimensions(new Dimension(0, 0));
	this.name = name;
}
 
开发者ID:cplutte,项目名称:bts,代码行数:13,代码来源:MarkerFigure.java

示例2: EdgeFigure

import org.eclipse.draw2d.LineBorder; //导入依赖的package包/类
public EdgeFigure() {
	tooltipFigure = new TooltipFigure();
	setToolTip(tooltipFigure);
	
	this.setLineWidth(this.getLineWidth() * 2);
	
	this.setTargetDecoration(new PolylineDecoration());

	label = new Label("e_"+ID.getId());
	label.setOpaque(true);
	label.setBackgroundColor(ColorConstants.buttonLightest);
	label.setBorder(new LineBorder());
 	add(label, new MidpointLocator(this, 0));
	
	guardedFigure = new GuardFigure();
	blockedFigure = new BlockedFigure();
	actionFigure = new ActionFigure ();
	add (actionFigure, new RelativeLocator(label,0.5,1.5));
}
 
开发者ID:gw4e,项目名称:gw4e.project,代码行数:20,代码来源:EdgeFigure.java

示例3: TableFigure

import org.eclipse.draw2d.LineBorder; //导入依赖的package包/类
public TableFigure() {
	ToolbarLayout layout = new ToolbarLayout();
	setLayoutManager(layout);
	LineBorder lineBorder = new LineBorder(ColorConstants.lightGray, 2);
	setBorder(lineBorder);
	setOpaque(true);
	setBackgroundColor(ColorConstants.white);

	Font font = new Font(null, "宋体", 11, SWT.NORMAL);
	label.setFont(font);
	label.setBorder(new LineBorder(ColorConstants.lightGray));
	label.setIcon(Activator.getImage(Activator.IMAGE_TABLE_16));
	label.setOpaque(true);
	label.setBackgroundColor(ColorConstants.lightBlue);
	label.setForegroundColor(ColorConstants.black);
	add(label);
	add(columnFigure);
}
 
开发者ID:bsteker,项目名称:bdf2,代码行数:19,代码来源:TableFigure.java

示例4: ValueLabel

import org.eclipse.draw2d.LineBorder; //导入依赖的package包/类
ValueLabel(IValueModel model) {
	this.model = model;
	setOpaque(true);
	FontManager.setFont(this, PandionJConstants.VALUE_FONT_SIZE);
	setSize(model.isDecimal() || model.isBoolean() ? PandionJConstants.POSITION_WIDTH*2 : PandionJConstants.POSITION_WIDTH, PandionJConstants.POSITION_WIDTH);
	setForegroundColor(ColorConstants.black);
	setBackgroundColor(PandionJConstants.Colors.VARIABLE_BOX);
	setBorder(new LineBorder(ColorConstants.black, PandionJConstants.ARRAY_LINE_WIDTH, SWT.LINE_SOLID));
	updateValue();
	model.registerDisplayObserver((a) -> updateValue());
	model.getRuntimeModel().registerDisplayObserver((e) -> {
		if(e.type == IRuntimeModel.Event.Type.STEP || e.type == IRuntimeModel.Event.Type.EVALUATION) {
			updateBackground();
		}
	});
	dirty = false;
}
 
开发者ID:andre-santos-pt,项目名称:pandionj,代码行数:18,代码来源:ValueLabel.java

示例5: update

import org.eclipse.draw2d.LineBorder; //导入依赖的package包/类
void update(int r, int g, int b) {
	boolean valid = 
			r >= 0 && r <= 255 && 
			g >= 0 && g <= 255 && 
			b >= 0 && b <= 255;
	colorFig.setOpaque(valid);
	colorFig.setBackgroundColor(valid ? PandionJUI.getColor(r, g, b) : null);
	colorFig.setBorder(new LineBorder(valid ? ColorConstants.black : PandionJConstants.Colors.ERROR));
	if(valid)
		colorFig.setToolTip(null);
	else {
		Label label = new Label("Invalid RGB values");
		label.setForegroundColor(PandionJConstants.Colors.ERROR);
		colorFig.setToolTip(label);
	}
	text.setText(r + ", " + g + ", " + b);
}
 
开发者ID:andre-santos-pt,项目名称:pandionj,代码行数:18,代码来源:ColorRGBArrayWidget.java

示例6: createSelectionHandles

import org.eclipse.draw2d.LineBorder; //导入依赖的package包/类
/**
 * Create selection handles in the style as predefined in DeltaEcore
 * @see DEGraphicalEditorTheme
 */
@Override
protected List<Object> createSelectionHandles() {
	List<Object> list = new ArrayList<Object>();

	MoveHandle moveHandle = new MoveHandle((GraphicalEditPart) getHost());
	moveHandle.setDragTracker(getDragTracker());		
	
	if (isDragAllowed()) {
		moveHandle.setCursor(Cursors.SIZEALL);
	} else {
		moveHandle.setCursor(SharedCursors.ARROW);
	}
	
	// set line style to meet the predefined theme
	DEGraphicalEditorTheme theme = DEGraphicalEditor.getTheme();
	LineBorder border = new LineBorder();
	border.setColor(theme.getSelectionSecondaryColor());
	border.setWidth(theme.getLineWidth());
	moveHandle.setBorder(border);
	
	list.add(moveHandle);
	
	return list;
}
 
开发者ID:DarwinSPL,项目名称:DarwinSPL,代码行数:29,代码来源:DwThemedNonResizableEditPolicy.java

示例7: createContents

import org.eclipse.draw2d.LineBorder; //导入依赖的package包/类
/**
 * createContents
 *   void
 */
private void createContents() {
    
    setLayoutManager(new CombinedFragmentLayout());
    setBorder(new LineBorder(0));
    setFill(false);
    setXOR(false);
    
    fragmentBoundary = new Polygon();
    fragmentBoundary.setFill(true);
    fragmentBoundary.setBackgroundColor(UiCorePlugin.getDefault().getColor(IConstantColorRegistry.LightGray));
    this.add(fragmentBoundary);
    
    fragmentLabel = new Label("None");
    this.add(fragmentLabel);

}
 
开发者ID:SK-HOLDINGS-CC,项目名称:NEXCORE-UML-Modeler,代码行数:21,代码来源:CombinedFragmentFigure.java

示例8: createDragSourceFeedbackFigure

import org.eclipse.draw2d.LineBorder; //导入依赖的package包/类
protected IFigure createDragSourceFeedbackFigure() {
	RectangleFigure r = new FeedbackFigure();
	r.setOpaque(false);
	r.setAlpha(50);
	r.setBackgroundColor(ColorConstants.gray);
	r.setFill(false);
	r.setBorder(new LineBorder(ColorConstants.gray, 1));
	addFeedback(r);
	return r;
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:11,代码来源:TableCellResizableEditPolicy.java

示例9: createFigure

import org.eclipse.draw2d.LineBorder; //导入依赖的package包/类
@Override
protected IFigure createFigure()
{
  RectangleFigure figure = new RectangleFigure();
  figure.setBackgroundColor(BACKGROUND_COLOR);
  Color borderCol = Display.getCurrent().getSystemColor(SWT.COLOR_GRAY);
  Border figureBorder = new LineBorder(borderCol, 2);
  figure.setBorder(figureBorder);

  figure.setOutline(false);
  GridLayout layoutManager = new GridLayout();
  // zero margin, in order to connect the dependent axes to the shared one
  layoutManager.marginHeight = 0;
  layoutManager.marginWidth = 0;
  figure.setLayoutManager(layoutManager);

  datasetsPane = new RectangleFigure();
  datasetsPane.setOutline(false);
  final SimpleLoweredBorder datasetBorder = new SimpleLoweredBorder(3);
  datasetsPane.setBorder(datasetBorder);
  GridLayout datasetsPaneLayout = new GridLayout();
  datasetsPane.setLayoutManager(datasetsPaneLayout);
  figure.add(datasetsPane);

  arrowFigure = new ArrowFigure(false);
  figure.add(arrowFigure);

  axisNameLabel = new AxisNameFigure(this);
  figure.add(axisNameLabel);

  return figure;
}
 
开发者ID:debrief,项目名称:limpet,代码行数:33,代码来源:AxisEditPart.java

示例10: createFigure

import org.eclipse.draw2d.LineBorder; //导入依赖的package包/类
@Override
protected IFigure createFigure()
{
  final RectangleFigure figure = new RectangleFigure();
  figure.setOutline(false);
  final Color borderCol = Display.getCurrent().getSystemColor(SWT.COLOR_GRAY);
  final Border figureBorder = new LineBorder(borderCol, 2);
  figure.setBorder(figureBorder);

  figure.setLayoutManager(new GridLayout());
  nameLabel = new DirectionalLabel(Activator.FONT_8);

  final ChartPaneEditPart.AxisLandingPad pad =
      (ChartPaneEditPart.AxisLandingPad) getModel();

  nameLabel.setText(pad.pos == ChartPanePosition.MIN ? "Min Axis"
      : "Max Axis");

  figure.add(nameLabel);
  figure.getLayoutManager().setConstraint(nameLabel, new GridData(
      GridData.FILL, GridData.FILL, true, true));

  return figure;
}
 
开发者ID:debrief,项目名称:limpet,代码行数:25,代码来源:AxisLandingPadEditPart.java

示例11: refreshFigure

import org.eclipse.draw2d.LineBorder; //导入依赖的package包/类
public void refreshFigure( )
{
	StyleHandle style = ( (DesignElementHandle) getDefaultHandle( ) )
			.getPrivateStyle( );

	//TODO:fixed the bug 191874
	//( (LabelFigure) getFigure( ) ).setFont( getFont( ) ); 
	( (LabelFigure) getFigure( ) ).setImage( getImage( ) );
	( (LabelFigure) getFigure( ) ).setAlignment( PositionConstants.WEST );
	( (LabelFigure) getFigure( ) ).setDirection( getTextDirection( getDefaultHandle( )) ); // bidi_hcg
	( (LabelFigure) getFigure( ) ).setText( getTemplateModel( )
			.getDisplayDescription( ) );
	( (LabelFigure) getFigure( ) )
			.setTextAlign( DesignChoiceConstants.TEXT_ALIGN_CENTER );
	( (LabelFigure) getFigure( ) )
			.setForegroundColor( ReportColorConstants.ShadowLineColor );
	( (LabelFigure) getFigure( ) ).setDisplay( style.getDisplay( ) );

	getFigure( ).setBorder( new LineBorder( 1 ) );
}
 
开发者ID:eclipse,项目名称:birt,代码行数:21,代码来源:PlaceHolderEditPart.java

示例12: refreshFigure

import org.eclipse.draw2d.LineBorder; //导入依赖的package包/类
public void refreshFigure( )
{
	StyleHandle style = ( (DesignElementHandle) getModel( ) ).getPrivateStyle( );
	( (LabelFigure) getFigure( ) ).setFont( FontManager.getFont("Dialog", 10, SWT.ITALIC) ); //$NON-NLS-1$
	
	//( (LabelFigure) getFigure( ) ).setImage( getImage( ) );
	( (LabelFigure) getFigure( ) ).setAlignment( PositionConstants.WEST );
	
	// bidi_hcg start
	// Set direction before setting text
	( (LabelFigure) getFigure( ) ).setDirection( getTextDirection( ) );
	// bidi_hcg end
	( (LabelFigure) getFigure( ) ).setText( MESSAGE );
	( (LabelFigure) getFigure( ) ).setTextAlign( DesignChoiceConstants.TEXT_ALIGN_LEFT );
	( (LabelFigure) getFigure( ) ).setForegroundColor( ReportColorConstants.RedWarning );
	( (LabelFigure) getFigure( ) ).setDisplay( style.getDisplay( ) );

	getFigure( ).setBorder( new LineBorder( 1 ) );
}
 
开发者ID:eclipse,项目名称:birt,代码行数:20,代码来源:DestroyEditPart.java

示例13: initialize

import org.eclipse.draw2d.LineBorder; //导入依赖的package包/类
/**
 * Initializes the handle. Sets the {@link DragTracker}and DragCursor.
 */
protected void initialize( )
{
	setOpaque( true );
	LineBorder bd = new LineBorder( 1 );
	bd.setColor( ReportColorConstants.HandleBorderColor );
	setBorder( bd );

	String tp = getTooltipText( );
	if ( tp != null )
	{
		Label tooltip = new Label( tp );
		tooltip.setBorder( new MarginBorder( 0, 2, 0, 2 ) );
		setToolTip( tooltip );
	}

	setCursor( Cursors.ARROW );
}
 
开发者ID:eclipse,项目名称:birt,代码行数:21,代码来源:RowHandle.java

示例14: TextAreaModelFigure

import org.eclipse.draw2d.LineBorder; //导入依赖的package包/类
public TextAreaModelFigure()
{

	this.setLayoutManager(new BorderLayout());
	FlowPage page = new FlowPage();

	label = new TextFlow();
	ParagraphTextLayout layout = new ParagraphTextLayout(label,
			ParagraphTextLayout.WORD_WRAP_SOFT);
	label.setLayoutManager(layout);
	label.setOpaque(false);
	page.add(label);
	this.add(page, BorderLayout.CENTER);
	this.setBorder(new LineBorder());
	this.setMinimumSize(new Dimension(RETURN_WIDTH * 2, RETURN_WIDTH * 2));
}
 
开发者ID:winture,项目名称:wt-studio,代码行数:17,代码来源:TextAreaModelFigure.java

示例15: VerticalBlockModelFigure

import org.eclipse.draw2d.LineBorder; //导入依赖的package包/类
public VerticalBlockModelFigure()
{
	// if (blockModel instanceof VerticalBlockModel)
	PageXYLayout vertical = new PageXYLayout();
	//vertical.setSpacing(5);
	// setLayoutManager(new VerticalFillLayout());
	// if (blockModel instanceof HorizontalBlockModel)
	// setLayoutManager(new HorizontalFillLayout());
	// FlowLayout vertical = new FlowLayout();
	// vertical.setSpacing(MAX_FLAG);
	// vertical.setVertical(true);
	setLayoutManager(vertical);
	setOpaque(true);
	setBackgroundColor(ColorConstants.white);
	// this.setBounds(rect)
	border = new LineBorder();
	// border.setLabel("垂直容器");
	border.setColor(color);
	border.setWidth(1);
	// FocusBorder focus = new FocusBorder();
	// this.setBorder(border);
	// border = new TitleBarBorder("Table dsf");
	setBorder(border);
}
 
开发者ID:winture,项目名称:wt-studio,代码行数:25,代码来源:VerticalBlockModelFigure.java


注:本文中的org.eclipse.draw2d.LineBorder类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。