Java Code Examples for org.eclipse.draw2d.ImageFigure#setOpaque()

The following examples show how to use org.eclipse.draw2d.ImageFigure#setOpaque() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: FunnyStyleSupport.java    From erflute with Apache License 2.0 6 votes vote down vote up
@Override
public void addIndex(IndexFigure indexFigure, String name, boolean isFirst) {
    final ImageFigure image = new ImageFigure();
    image.setBorder(new MarginBorder(new Insets(0, 0, 0, 19)));
    image.setImage(Activator.getImage(ImageKey.BLANK_WHITE));
    image.setOpaque(true);
    indexFigure.add(image);

    final StringBuilder text = new StringBuilder();
    text.append(name);
    final Label label = createColumnLabel();
    label.setBorder(new MarginBorder(new Insets(1, 0, 0, 4)));
    label.setForegroundColor(ColorConstants.black);
    label.setText(text.toString());

    indexFigure.add(label);
}
 
Example 2
Source File: FunnyStyleSupport.java    From ermaster-b with Apache License 2.0 6 votes vote down vote up
public void addIndex(IndexFigure indexFigure, String name, boolean isFirst) {

		ImageFigure image = new ImageFigure();
		image.setBorder(new MarginBorder(new Insets(0, 0, 0, 19)));
		image.setImage(Activator.getImage(ImageKey.BLANK_WHITE));
		image.setOpaque(true);
		indexFigure.add(image);
//		Label filler = new Label();
//		filler.setBorder(new MarginBorder(new Insets(0, 0, 0, 16)));
//		filler.setBorder(new MarginBorder(new Insets(1, 4, 0, 16)));
//		indexFigure.add(filler);

		StringBuilder text = new StringBuilder();
		text.append(name);
		Label label = this.createColumnLabel();
		label.setBorder(new MarginBorder(new Insets(1, 0, 0, 4)));
		label.setForegroundColor(ColorConstants.black);
		label.setText(text.toString());

		indexFigure.add(label);
	}