1 26 package org.objectweb.openccm.explorer.commandLine; 27 28 29 import org.objectweb.util.cmdline.lib.DefaultOptionBase; 30 31 39 public class ViewOption extends DefaultOptionBase { 40 41 42 protected ViewApplication application_; 43 44 48 public ViewOption(ViewApplication application) { 49 super(); 51 setLabels(new String [] { "--view" }); 52 setArguments(new String [] { "view_type" }); 53 setDescription(new String [] { "Set the view of the main frame (basic|tabs) (default value is basic)" }); 54 setMandatory(false); 55 56 application_ = application; 58 } 59 60 64 68 public void consume(org.objectweb.util.cmdline.api.Iterator iterator) { 69 checkAlreadySet(iterator); 70 String view = consumeArgument(iterator); 71 if((view!=null) && (view.equals("basic")||view.equals("tabs"))){ 72 application_.setView(view); 73 } 74 } 75 76 } 77 | Popular Tags |