public String getHelp(final View view) {
return null;
}
};
View view = new Button(action, workspace);
view.setLocation(new Location(100, 100));
view.setSize(view.getRequiredSize(new Size()));
workspace.addView(view);
ButtonAction action2 = new ButtonAction() {
public Consent disabled(final View view) {
return Veto.DEFAULT;
}
public void execute(final Workspace workspace, final View view, final Location at) {
view.getFeedbackManager().setViewDetail("Button 1 pressed");
}
public String getDescription(final View view) {
return "Button that can't be pressed";
}
public ObjectActionType getType() {
return USER;
}
public String getName(final View view) {
return "Press Me Now!";
}
public boolean isDefault() {
return false;
}
public String getHelp(final View view) {
return null;
}
};
View view2 = new Button(action2, workspace);
view2.setLocation(new Location(200, 100));
view2.setSize(view2.getRequiredSize(new Size()));
workspace.addView(view2);
}