1 11 package org.eclipse.jface.action; 12 13 import org.eclipse.core.commands.IHandlerAttributes; 14 import org.eclipse.jface.resource.ImageDescriptor; 15 import org.eclipse.jface.util.IPropertyChangeListener; 16 import org.eclipse.swt.events.HelpListener; 17 import org.eclipse.swt.widgets.Event; 18 19 43 public interface IAction { 44 45 54 public static int AS_UNSPECIFIED = 0x00; 55 56 60 public static int AS_PUSH_BUTTON = 0x01; 61 62 66 public static int AS_CHECK_BOX = 0x02; 67 68 72 public static int AS_DROP_DOWN_MENU = 0x04; 73 74 80 public static int AS_RADIO_BUTTON = 0x08; 81 82 85 public static final String TEXT = "text"; 87 91 public static final String ENABLED = "enabled"; 93 96 public static final String IMAGE = "image"; 98 101 public static final String TOOL_TIP_TEXT = "toolTipText"; 103 107 public static final String DESCRIPTION = "description"; 109 114 public static final String CHECKED = "checked"; 116 132 public static final String RESULT = "result"; 134 145 public static final String HANDLED = IHandlerAttributes.ATTRIBUTE_HANDLED; 146 147 153 public void addPropertyChangeListener(IPropertyChangeListener listener); 154 155 163 public int getAccelerator(); 164 165 172 public String getActionDefinitionId(); 173 174 180 public String getDescription(); 181 182 192 public ImageDescriptor getDisabledImageDescriptor(); 193 194 199 public HelpListener getHelpListener(); 200 201 213 public ImageDescriptor getHoverImageDescriptor(); 214 215 221 public String getId(); 222 223 233 public ImageDescriptor getImageDescriptor(); 234 235 240 public IMenuCreator getMenuCreator(); 241 242 248 public int getStyle(); 249 250 260 public String getText(); 261 262 272 public String getToolTipText(); 273 274 285 public boolean isChecked(); 286 287 298 public boolean isEnabled(); 299 300 310 public boolean isHandled(); 311 312 318 public void removePropertyChangeListener(IPropertyChangeListener listener); 319 320 326 public void run(); 327 328 338 public void runWithEvent(Event event); 339 340 346 public void setActionDefinitionId(String id); 347 348 359 public void setChecked(boolean checked); 360 361 372 public void setDescription(String text); 373 374 387 public void setDisabledImageDescriptor(ImageDescriptor newImage); 388 389 405 public void setEnabled(boolean enabled); 406 407 412 public void setHelpListener(HelpListener listener); 413 414 427 public void setHoverImageDescriptor(ImageDescriptor newImage); 428 429 440 public void setId(String id); 441 442 453 public void setImageDescriptor(ImageDescriptor newImage); 454 455 461 public void setMenuCreator(IMenuCreator creator); 462 463 480 public void setText(String text); 481 482 492 public void setToolTipText(String text); 493 494 515 public void setAccelerator(int keycode); 516 } 517 | Popular Tags |