java - What is the proper way to display a complex dialog in an Eclipse plugin? -
i want complex dialog appear when user clicks button plugin adds, not find existing dialog type supports adding arbitrary controls.
instead, thinking creating wizard 1 page - enough doesn't feel right. there better way create dialog complex controls?
you want subclass org.eclipse.jface.dialogs.traydialog. give dialog button bar , slide out tray appear when click button. according javadoc of traydialog:
it recommended subclass class instead of
dialog
in cases except dialog should never show tray
you put complex code in createdialogarea(composite parent)
method. if want right make sure use composite returned calling super instead of using parent. make sure margins set default. instance:
protected control createdialogarea(composite parent) { composite parentwithmargins = (composite) super.createdialogarea(parent); /* * add code here parenting off of parentwithmargins */ return parentwithmargins; }
Comments
Post a Comment