Java Code Examples for org.eclipse.jface.action.Action#AS_DROP_DOWN_MENU

The following examples show how to use org.eclipse.jface.action.Action#AS_DROP_DOWN_MENU . 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: ChangeBackgroundColorAction.java    From erflute with Apache License 2.0 5 votes vote down vote up
public ChangeBackgroundColorAction(IWorkbenchPart part, ERDiagram diagram) {
    super(part, Action.AS_DROP_DOWN_MENU);
    setId(ID);
    setText(DisplayMessages.getMessage("action.title.change.background.color"));
    setToolTipText(DisplayMessages.getMessage("action.title.change.background.color"));
    final int[] defaultColor = diagram.getDefaultColor();
    this.rgb = new RGB(defaultColor[0], defaultColor[1], defaultColor[2]);
    setColorToImage();
}
 
Example 2
Source File: ChangeBackgroundColorAction.java    From ermaster-b with Apache License 2.0 5 votes vote down vote up
public ChangeBackgroundColorAction(IWorkbenchPart part, ERDiagram diagram) {
	super(part, Action.AS_DROP_DOWN_MENU);

	this.setId(ID);

	this.setText(ResourceString
			.getResourceString("action.title.change.background.color"));
	this.setToolTipText(ResourceString
			.getResourceString("action.title.change.background.color"));

	int[] defaultColor = diagram.getDefaultColor();

	this.rgb = new RGB(defaultColor[0], defaultColor[1], defaultColor[2]);
	this.setColorToImage();
}