Search in sources :

Example 1 with ManageContentDialog

use of org.pentaho.mantle.client.dialogs.ManageContentDialog in project pentaho-platform by pentaho.

the class ManageContentCommand method performOperation.

protected void performOperation(boolean feedback) {
    final ManageContentDialog dialog = new ManageContentDialog();
    dialog.setCallback(new IDialogCallback() {

        public void okPressed() {
            if (dialog.getState() == ManageContentDialog.STATE.EDIT) {
                OpenFileCommand cmd = new OpenFileCommand(FileCommand.COMMAND.EDIT);
                cmd.execute();
            } else if (dialog.getState() == ManageContentDialog.STATE.SHARE) {
                OpenFileCommand cmd = new OpenFileCommand(FileCommand.COMMAND.SHARE);
                cmd.execute();
            } else if (dialog.getState() == ManageContentDialog.STATE.SCHEDULE) {
                OpenFileCommand cmd = new OpenFileCommand(FileCommand.COMMAND.SCHEDULE_NEW);
                cmd.execute();
            }
        }

        public void cancelPressed() {
        }
    });
    dialog.center();
}
Also used : IDialogCallback(org.pentaho.gwt.widgets.client.dialogs.IDialogCallback) ManageContentDialog(org.pentaho.mantle.client.dialogs.ManageContentDialog)

Aggregations

IDialogCallback (org.pentaho.gwt.widgets.client.dialogs.IDialogCallback)1 ManageContentDialog (org.pentaho.mantle.client.dialogs.ManageContentDialog)1