/** * Creates a new {@link CPreferenceMenuPiece}. Reads the model of <code>control</code>, * if <code>control</code> has no model then a new {@link PreferenceModel} will * be created and set. * @param control the control whose model will be shown * @return a new menu piece * @see CControl#getPreferenceModel() * @see CControl#setPreferenceModel(PreferenceModel) */ public static CPreferenceMenuPiece setup( CControl control ){ if( control.getPreferenceModel() == null ) control.setPreferenceModel( new CPreferenceModel( control )); return new CPreferenceMenuPiece( control ); }
/** * Creates a new {@link CPreferenceMenuPiece}. Reads the model of <code>control</code>, * if <code>control</code> has no model then a new {@link PreferenceModel} will * be created and set. * @param control the control whose model will be shown * @return a new menu piece * @see CControl#getPreferenceModel() * @see CControl#setPreferenceModel(PreferenceModel) */ public static CPreferenceMenuPiece setup( CControl control ){ if( control.getPreferenceModel() == null ) control.setPreferenceModel( new CPreferenceModel( control )); return new CPreferenceMenuPiece( control ); }
/** * Creates the new manager * @param owner the window used as parent for all dialogs */ public DockingManagerImpl( JFrame owner){ this.owner = owner; // Method bibliothek.gui.dock.util.DockUtilities.checkLayoutLocked(DockUtilities.java:723) // Throw a RuntimeException: java.lang.Error: Trampoline must not be defined by the bootstrap classloader DockUtilities.disableCheckLayoutLocked(); commonControl = new CControl(owner); commonControl.addControlListener(new DockingListener()); dockableMenuTracker = new SingleCDockableListMenuPiece( commonControl); //Retrieve the Docking Frames Preferencies preferences = new OrbisGISPreferenceTreeModel( commonControl,PathCombiner.APPEND); commonControl.setPreferenceModel(preferences); //DEFAULT property of a view // commonControl.getController().getProperties().set( PropertyKey.DOCK_STATION_TITLE, I18N.tr("Docked Window") ); commonControl.getController().getProperties().set( PropertyKey.DOCK_STATION_ICON, OrbisGISIcon.getIcon("orbisgis") ); commonControl.getController().getThemeManager().setBackgroundPaint(ThemeManager.BACKGROUND_PAINT + ".station.toolbar.container",new ToolBarBackGround()); commonControl.putProperty( ToolbarDockStation.SIDE_GAP, 2 ); commonControl.putProperty( ToolbarDockStation.GAP, 2 ); //StackDockStation will contain all instances of ReservedDockStation area = new CToolbarContentArea( commonControl, "base" ); commonControl.addStationContainer( area ); owner.add(area); } /**