Thread: [Ejtools-cvs] CVS: libraries/adwt/src/main/net/sourceforge/ejtools/awt/services AboutService.java,1.
Brought to you by:
letiemble
Update of /cvsroot/ejtools/libraries/adwt/src/main/net/sourceforge/ejtools/awt/services In directory usw-pr-cvs1:/tmp/cvs-serv8679/adwt/src/main/net/sourceforge/ejtools/awt/services Modified Files: AboutService.java AboutServiceProvider.java ActionToolBar.java BeanContextInternalFrame.java FrameService.java FrameServiceProvider.java HistoryService.java HistoryServiceProvider.java MDIDesktopPane.java MDIFrameService.java MenuBarService.java MenuBarServiceProvider.java PreferencesService.java SDIFrameService.java StatusBarService.java StatusBarServiceProvider.java ToolBarService.java ToolBarServiceProvider.java Log Message: Add some JavaDocs Index: AboutService.java =================================================================== RCS file: /cvsroot/ejtools/libraries/adwt/src/main/net/sourceforge/ejtools/awt/services/AboutService.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** AboutService.java 30 Apr 2002 21:04:07 -0000 1.2 --- AboutService.java 5 May 2002 20:13:46 -0000 1.3 *************** *** 10,26 **** /** ! * Description of the Class * ! * @author letiemble ! * @created 25 octobre 2001 ! * @version $Revision$ ! * @todo Javadoc to complete */ public interface AboutService { /** ! * Description of the Method * ! * @return The value of panel attribute */ public Container getPanel(); --- 10,26 ---- /** ! * Description of the Class * ! * @author letiemble ! * @created 25 octobre 2001 ! * @version $Revision$ ! * @todo Javadoc to complete */ public interface AboutService { /** ! * Description of the Method * ! * @return The value of panel attribute */ public Container getPanel(); *************** *** 28,34 **** /** ! * Getter for the title attribute * ! * @return The value of title attribute */ public String getTitle(); --- 28,34 ---- /** ! * Getter for the title attribute * ! * @return The value of title attribute */ public String getTitle(); Index: AboutServiceProvider.java =================================================================== RCS file: /cvsroot/ejtools/libraries/adwt/src/main/net/sourceforge/ejtools/awt/services/AboutServiceProvider.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** AboutServiceProvider.java 30 Apr 2002 21:04:07 -0000 1.2 --- AboutServiceProvider.java 5 May 2002 20:13:46 -0000 1.3 *************** *** 28,50 **** /** ! * Description of the Class * ! * @author letiemble ! * @created 2 novembre 2001 ! * @version $Revision$ ! * @todo Javadoc to complete ! * @todo I18N to complete */ public class AboutServiceProvider extends BeanContextServicesSupport implements BeanContextServiceProvider, AboutService { ! /** Description of the Field */ ! private static Category cat = Category.getInstance(AboutServiceProvider.class.getName()); ! /** Description of the Field */ private JPanel panel = null; ! /** Description of the Field */ private AboutService service = null; ! /** Constructor for the AboutServiceProvider object */ public AboutServiceProvider() { --- 28,50 ---- /** ! * Description of the Class * ! * @author letiemble ! * @created 2 novembre 2001 ! * @version $Revision$ ! * @todo Javadoc to complete ! * @todo I18N to complete */ public class AboutServiceProvider extends BeanContextServicesSupport implements BeanContextServiceProvider, AboutService { ! /** Description of the Field */ private JPanel panel = null; ! /** Description of the Field */ private AboutService service = null; + /** Description of the Field */ + private static Category cat = Category.getInstance(AboutServiceProvider.class.getName()); ! /** Constructor for the AboutServiceProvider object */ public AboutServiceProvider() { *************** *** 54,60 **** /** ! * Constructor for the AboutServiceProvider object * ! * @param service Description of Parameter */ public AboutServiceProvider(AboutService service) --- 54,60 ---- /** ! * Constructor for the AboutServiceProvider object * ! * @param service Description of Parameter */ public AboutServiceProvider(AboutService service) *************** *** 65,74 **** /** ! * Gets the currentServiceSelectors attribute of the ! * ApplicationServiceProvider object * ! * @param bcs Description of Parameter ! * @param serviceClass Description of Parameter ! * @return The currentServiceSelectors value */ public Iterator getCurrentServiceSelectors(BeanContextServices bcs, Class serviceClass) --- 65,74 ---- /** ! * Gets the currentServiceSelectors attribute of the ! * ApplicationServiceProvider object * ! * @param bcs Description of Parameter ! * @param serviceClass Description of Parameter ! * @return The currentServiceSelectors value */ public Iterator getCurrentServiceSelectors(BeanContextServices bcs, Class serviceClass) *************** *** 79,85 **** /** ! * Gets the panel attribute of the AboutServiceProvider object * ! * @return The panel value */ public Container getPanel() --- 79,85 ---- /** ! * Gets the panel attribute of the AboutServiceProvider object * ! * @return The panel value */ public Container getPanel() *************** *** 94,135 **** /** ! * Getter for the title attribute * ! * @return The value of title attribute */ ! public String getTitle() { ! return "About Service"; } /** ! * Gets the service attribute of the ApplicationServiceProvider object * ! * @param bcs Description of Parameter ! * @param requestor Description of Parameter ! * @param serviceClass Description of Parameter ! * @param serviceSelector Description of Parameter ! * @return The service value */ ! public Object getService(BeanContextServices bcs, Object requestor, Class serviceClass, Object serviceSelector) { ! return service; } /** ! * Description of the Method * ! * @param bcs Description of Parameter ! * @param requestor Description of Parameter ! * @param service Description of Parameter */ ! public void releaseService(BeanContextServices bcs, Object requestor, Object service) ! { ! } ! /** Description of the Method */ protected void initializeBeanContextResources() { --- 94,133 ---- /** ! * Gets the service attribute of the ApplicationServiceProvider object * ! * @param bcs Description of Parameter ! * @param requestor Description of Parameter ! * @param serviceClass Description of Parameter ! * @param serviceSelector Description of Parameter ! * @return The service value */ ! public Object getService(BeanContextServices bcs, Object requestor, Class serviceClass, Object serviceSelector) { ! return service; } /** ! * Getter for the title attribute * ! * @return The value of title attribute */ ! public String getTitle() { ! return "About Service"; } /** ! * Description of the Method * ! * @param bcs Description of Parameter ! * @param requestor Description of Parameter ! * @param service Description of Parameter */ ! public void releaseService(BeanContextServices bcs, Object requestor, Object service) { } ! /** Description of the Method */ protected void initializeBeanContextResources() { *************** *** 154,158 **** ! /** Description of the Method */ protected void releaseBeanContextResources() { --- 152,156 ---- ! /** Description of the Method */ protected void releaseBeanContextResources() { *************** *** 163,167 **** ! /** Description of the Method */ protected void show() { --- 161,165 ---- ! /** Description of the Method */ protected void show() { *************** *** 187,191 **** ! /** Description of the Method */ private void createPanel() { --- 185,189 ---- ! /** Description of the Method */ private void createPanel() { Index: ActionToolBar.java =================================================================== RCS file: /cvsroot/ejtools/libraries/adwt/src/main/net/sourceforge/ejtools/awt/services/ActionToolBar.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ActionToolBar.java 30 Apr 2002 21:06:19 -0000 1.2 --- ActionToolBar.java 5 May 2002 20:13:46 -0000 1.3 *************** *** 14,35 **** /** ! * Description of the Class * ! * @author letiemble ! * @created 2 novembre 2001 ! * @version $Revision$ ! * @todo Javadoc to complete */ public class ActionToolBar extends JToolBar { ! /** Description of the Field */ protected Hashtable buttons = new Hashtable(); /** ! * Description of the Method * ! * @param action Description of Parameter ! * @return Description of the Returned Value */ public JButton add(Action action) --- 14,35 ---- /** ! * Description of the Class * ! * @author letiemble ! * @created 2 novembre 2001 ! * @version $Revision$ ! * @todo Javadoc to complete */ public class ActionToolBar extends JToolBar { ! /** Description of the Field */ protected Hashtable buttons = new Hashtable(); /** ! * Description of the Method * ! * @param action Description of Parameter ! * @return Description of the Returned Value */ public JButton add(Action action) *************** *** 42,48 **** /** ! * Description of the Method * ! * @param action Description of Parameter */ public void remove(Action action) --- 42,48 ---- /** ! * Description of the Method * ! * @param action Description of Parameter */ public void remove(Action action) Index: BeanContextInternalFrame.java =================================================================== RCS file: /cvsroot/ejtools/libraries/adwt/src/main/net/sourceforge/ejtools/awt/services/BeanContextInternalFrame.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** BeanContextInternalFrame.java 30 Apr 2002 21:06:19 -0000 1.2 --- BeanContextInternalFrame.java 5 May 2002 20:13:46 -0000 1.3 *************** *** 25,74 **** /** ! * Description of the Class * ! * @author letiemble ! * @created 25 octobre 2001 ! * @version $Revision$ ! * @todo Javadoc to complete */ public class BeanContextInternalFrame extends BeanContextServicesSupport { ! /** Description of the Field */ ! protected static ButtonGroup group = new ButtonGroup(); ! ! /** Description of the Field */ ! private static Category cat = Category.getInstance(BeanContextInternalFrame.class.getName()); ! /** Description of the Field */ ! protected JInternalFrame frame; ! /** Description of the Field */ protected CommandAction action; ! /** Description of the Field */ protected MDIFrameService service; ! /** Description of the Field */ protected ViewerManager viewer; ! /** Constructor for the BeanContextInternalFrame object */ ! public BeanContextInternalFrame() { } /** ! * Sets the title attribute of the BeanContextInternalFrame object * ! * @param title The new title value */ ! public void setTitle(String title) { ! frame.setTitle(title); ! action.putValue(Action.NAME, title); } /** ! * Gets the component attribute of the BeanContextInternalFrame object * ! * @return The component value */ public Component getComponent() --- 25,78 ---- /** ! * Description of the Class * ! * @author letiemble ! * @created 25 octobre 2001 ! * @version $Revision$ ! * @todo Javadoc to complete */ public class BeanContextInternalFrame extends BeanContextServicesSupport { ! /** Description of the Field */ protected CommandAction action; ! /** Description of the Field */ ! protected JInternalFrame frame; ! /** Description of the Field */ protected MDIFrameService service; ! /** Description of the Field */ protected ViewerManager viewer; + /** Description of the Field */ + protected static ButtonGroup group = new ButtonGroup(); + + /** Description of the Field */ + private static Category cat = Category.getInstance(BeanContextInternalFrame.class.getName()); ! /** Constructor for the BeanContextInternalFrame object */ ! public BeanContextInternalFrame() { } ! ! ! /** Description of the Method */ ! public void close() { + frame.doDefaultCloseAction(); } /** ! * Gets the action attribute of the BeanContextInternalFrame object * ! * @return The action value */ ! public CommandAction getAction() { ! return this.action; } /** ! * Gets the component attribute of the BeanContextInternalFrame object * ! * @return The component value */ public Component getComponent() *************** *** 79,100 **** /** ! * Gets the action attribute of the BeanContextInternalFrame object * ! * @return The action value */ ! public CommandAction getAction() { ! return this.action; } ! /** Description of the Method */ ! public void close() { ! frame.doDefaultCloseAction(); } ! /** Description of the Method */ protected void initializeBeanContextResources() { --- 83,130 ---- /** ! * Sets the title attribute of the BeanContextInternalFrame object * ! * @param title The new title value */ ! public void setTitle(String title) { ! frame.setTitle(title); ! action.putValue(Action.NAME, title); } ! /** Description of the Method */ ! protected void activate() { ! try ! { ! if (service != null) ! { ! service.activate(BeanContextInternalFrame.this); ! } ! if (action != null) ! { ! action.getMenuItem().setSelected(true); ! } ! } ! catch (Exception e) ! { ! } } ! /** Description of the Method */ ! protected void createFrame() { } ! ! ! /** ! * Description of the Method ! * ! * @exception Exception Description of Exception ! */ ! protected void destroyFrame() throws Exception { } ! ! ! /** Description of the Method */ protected void initializeBeanContextResources() { *************** *** 142,169 **** - /** Description of the Method */ - protected void activate() - { - try - { - if (service != null) - { - service.activate(BeanContextInternalFrame.this); - } - if (action != null) - { - action.getMenuItem().setSelected(true); - } - } - catch (Exception e) - { - } - } - - /** ! * Description of the Method * ! * @param context Description of Parameter */ protected void register(BeanContextServices context) --- 172,179 ---- /** ! * Description of the Method * ! * @param context Description of Parameter */ protected void register(BeanContextServices context) *************** *** 186,213 **** ! /** ! * Description of the Method ! * ! * @param context Description of Parameter ! */ ! protected void unregister(BeanContextServices context) ! { ! if (context.hasService(MDIFrameService.class)) ! { ! cat.debug("Using service MDIFrameService..."); ! try ! { ! context.releaseService(this, this, MDIFrameService.class); ! } ! catch (Exception e) ! { ! cat.error("Error during utilisation of service MDIFrameService (" + e.getMessage() + ")"); ! e.printStackTrace(); ! } ! } ! } ! ! ! /** Description of the Method */ protected void releaseBeanContextResources() { --- 196,200 ---- ! /** Description of the Method */ protected void releaseBeanContextResources() { *************** *** 228,259 **** - /** Description of the Method */ - protected void createFrame() - { - } - - /** ! * Description of the Method * ! * @exception Exception Description of Exception */ ! protected void destroyFrame() throws Exception { } /** ! * Description of the Class * ! * @author laurent ! * @created 12 janvier 2002 */ class ViewerManager extends InternalFrameAdapter { /** ! * Description of the Method * ! * @param e Description of Parameter */ public void internalFrameActivated(InternalFrameEvent e) --- 215,253 ---- /** ! * Description of the Method * ! * @param context Description of Parameter */ ! protected void unregister(BeanContextServices context) { + if (context.hasService(MDIFrameService.class)) + { + cat.debug("Using service MDIFrameService..."); + try + { + context.releaseService(this, this, MDIFrameService.class); + } + catch (Exception e) + { + cat.error("Error during utilisation of service MDIFrameService (" + e.getMessage() + ")"); + e.printStackTrace(); + } + } } /** ! * Description of the Class * ! * @author laurent ! * @created 12 janvier 2002 */ class ViewerManager extends InternalFrameAdapter { /** ! * Description of the Method * ! * @param e Description of Parameter */ public void internalFrameActivated(InternalFrameEvent e) *************** *** 264,270 **** /** ! * Description of the Method * ! * @param e Description of Parameter */ public void internalFrameClosed(InternalFrameEvent e) --- 258,264 ---- /** ! * Description of the Method * ! * @param e Description of Parameter */ public void internalFrameClosed(InternalFrameEvent e) Index: FrameService.java =================================================================== RCS file: /cvsroot/ejtools/libraries/adwt/src/main/net/sourceforge/ejtools/awt/services/FrameService.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FrameService.java 30 Apr 2002 21:03:36 -0000 1.2 --- FrameService.java 5 May 2002 20:13:46 -0000 1.3 *************** *** 13,35 **** /** ! * Description of the Class * ! * @author letiemble ! * @created 25 octobre 2001 ! * @version $Revision$ ! * @todo Javadoc to complete */ public interface FrameService extends BeanContextContainerProxy, MenuBarService.Listener { ! /** Description of the Field */ public final static String MDI_FRAME = "MDI"; ! /** Description of the Field */ public final static String SDI_FRAME = "SDI"; /** ! * Setter for the title attribute * ! * @param title The new value */ public void setTitle(String title); --- 13,35 ---- /** ! * Description of the Class * ! * @author letiemble ! * @created 25 octobre 2001 ! * @version $Revision$ ! * @todo Javadoc to complete */ public interface FrameService extends BeanContextContainerProxy, MenuBarService.Listener { ! /** Description of the Field */ public final static String MDI_FRAME = "MDI"; ! /** Description of the Field */ public final static String SDI_FRAME = "SDI"; /** ! * Setter for the title attribute * ! * @param title The new value */ public void setTitle(String title); *************** *** 37,43 **** /** ! * Adds a feature to the WindowListener attribute of the FrameService object * ! * @param l The feature to be added to the WindowListener attribute */ public void addWindowListener(WindowListener l); --- 37,43 ---- /** ! * Adds a feature to the WindowListener attribute of the FrameService object * ! * @param l The feature to be added to the WindowListener attribute */ public void addWindowListener(WindowListener l); *************** *** 45,51 **** /** ! * Description of the Method * ! * @param l Description of Parameter */ public void removeWindowListener(WindowListener l); --- 45,51 ---- /** ! * Description of the Method * ! * @param l Description of Parameter */ public void removeWindowListener(WindowListener l); Index: FrameServiceProvider.java =================================================================== RCS file: /cvsroot/ejtools/libraries/adwt/src/main/net/sourceforge/ejtools/awt/services/FrameServiceProvider.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FrameServiceProvider.java 30 Apr 2002 21:03:36 -0000 1.2 --- FrameServiceProvider.java 5 May 2002 20:13:46 -0000 1.3 *************** *** 33,67 **** /** ! * Description of the Class * ! * @author letiemble ! * @created 2 novembre 2001 ! * @version $Revision$ ! * @todo Javadoc to complete */ public class FrameServiceProvider extends BeanContextServicesSupport implements BeanContextServiceProvider, MDIFrameService, SDIFrameService { ! /** Description of the Field */ ! private static Category cat = Category.getInstance(FrameServiceProvider.class); ! /** Description of the Field */ ! private FrameService service = null; ! /** Description of the Field */ ! private String type = null; ! /** Description of the Field */ ! private JFrame frame = new JFrame(); ! /** Description of the Field */ ! private MDIDesktopPane desktop = new MDIDesktopPane(); ! /** Description of the Field */ private Container content = new JPanel(); ! /** Description of the Field */ ! private JScrollPane scrollPane = new JScrollPane(); ! /** Description of the Field */ private Vector frames = new Vector(); /** ! * Constructor for the FrameServiceProvider object * ! * @param type Description of Parameter */ public FrameServiceProvider(String type) --- 33,67 ---- /** ! * Description of the Class * ! * @author letiemble ! * @created 2 novembre 2001 ! * @version $Revision$ ! * @todo Javadoc to complete */ public class FrameServiceProvider extends BeanContextServicesSupport implements BeanContextServiceProvider, MDIFrameService, SDIFrameService { ! /** Description of the Field */ private Container content = new JPanel(); ! /** Description of the Field */ ! private MDIDesktopPane desktop = new MDIDesktopPane(); ! /** Description of the Field */ ! private JFrame frame = new JFrame(); ! /** Description of the Field */ private Vector frames = new Vector(); + /** Description of the Field */ + private JScrollPane scrollPane = new JScrollPane(); + /** Description of the Field */ + private FrameService service = null; + /** Description of the Field */ + private String type = null; + /** Description of the Field */ + private static Category cat = Category.getInstance(FrameServiceProvider.class); /** ! * Constructor for the FrameServiceProvider object * ! * @param type Description of Parameter */ public FrameServiceProvider(String type) *************** *** 73,101 **** /** ! * Sets the content attribute of the FrameServiceProvider object * ! * @param c The new content value */ ! public void setContent(Container c) { ! this.content = c; } /** ! * Setter for the title attribute * ! * @param title The new value */ ! public void setTitle(String title) { ! this.frame.setTitle(title); } /** ! * Gets the container attribute of the FrameServiceProvider object * ! * @return The container value */ public Container getContainer() --- 73,132 ---- /** ! * Description of the Method * ! * @param frame Description of Parameter */ ! public void activate(BeanContextInternalFrame frame) { ! desktop.getDesktopManager().activateFrame(((JInternalFrame) frame.getComponent())); ! try ! { ! ((JInternalFrame) frame.getComponent()).setSelected(true); ! } ! catch (PropertyVetoException e) ! { ! } } /** ! * Adds a feature to the WindowListener attribute of the FrameServiceProvider ! * object * ! * @param l The feature to be added to the WindowListener attribute */ ! public void addWindowListener(WindowListener l) { ! frame.addWindowListener(l); } /** ! * Gets the activated attribute of the FrameServiceProvider object * ! * @return The activated value ! */ ! public BeanContextInternalFrame getActivated() ! { ! Iterator enum = frames.iterator(); ! while (enum.hasNext()) ! { ! Object obj = enum.next(); ! if (obj instanceof BeanContextInternalFrame) ! { ! if (isActivated((BeanContextInternalFrame) obj)) ! { ! return ((BeanContextInternalFrame) obj); ! } ! } ! } ! return null; ! } ! ! ! /** ! * Gets the container attribute of the FrameServiceProvider object ! * ! * @return The container value */ public Container getContainer() *************** *** 106,116 **** /** ! * Gets the service attribute of the ApplicationServiceProvider object * ! * @param bcs Description of Parameter ! * @param requestor Description of Parameter ! * @param serviceClass Description of Parameter ! * @param serviceSelector Description of Parameter ! * @return The service value */ public Object getService(BeanContextServices bcs, Object requestor, Class serviceClass, Object serviceSelector) --- 137,161 ---- /** ! * Gets the currentServiceSelectors attribute of the ! * ApplicationServiceProvider object * ! * @param bcs Description of Parameter ! * @param serviceClass Description of Parameter ! * @return The currentServiceSelectors value ! */ ! public Iterator getCurrentServiceSelectors(BeanContextServices bcs, Class serviceClass) ! { ! return new Vector().iterator(); ! } ! ! ! /** ! * Gets the service attribute of the ApplicationServiceProvider object ! * ! * @param bcs Description of Parameter ! * @param requestor Description of Parameter ! * @param serviceClass Description of Parameter ! * @param serviceSelector Description of Parameter ! * @return The service value */ public Object getService(BeanContextServices bcs, Object requestor, Class serviceClass, Object serviceSelector) *************** *** 134,155 **** /** ! * Gets the currentServiceSelectors attribute of the ! * ApplicationServiceProvider object ! * ! * @param bcs Description of Parameter ! * @param serviceClass Description of Parameter ! * @return The currentServiceSelectors value ! */ ! public Iterator getCurrentServiceSelectors(BeanContextServices bcs, Class serviceClass) ! { ! return new Vector().iterator(); ! } ! ! ! /** ! * Gets the activated attribute of the FrameServiceProvider object * ! * @param frame Description of Parameter ! * @return The activated value */ public boolean isActivated(BeanContextInternalFrame frame) --- 179,186 ---- /** ! * Gets the activated attribute of the FrameServiceProvider object * ! * @param frame Description of Parameter ! * @return The activated value */ public boolean isActivated(BeanContextInternalFrame frame) *************** *** 160,201 **** /** ! * Gets the activated attribute of the FrameServiceProvider object * ! * @return The activated value */ ! public BeanContextInternalFrame getActivated() { ! Iterator enum = frames.iterator(); ! while (enum.hasNext()) ! { ! Object obj = enum.next(); ! if (obj instanceof BeanContextInternalFrame) ! { ! if (isActivated((BeanContextInternalFrame) obj)) ! { ! return ((BeanContextInternalFrame) obj); ! } ! } ! } ! return null; } /** ! * Adds a feature to the WindowListener attribute of the FrameServiceProvider object * ! * @param l The feature to be added to the WindowListener attribute */ ! public void addWindowListener(WindowListener l) ! { ! frame.addWindowListener(l); ! } /** ! * Description of the Method * ! * @param l Description of Parameter */ public void removeWindowListener(WindowListener l) --- 191,221 ---- + /** ! * Description of the Method * ! * @param frame Description of Parameter */ ! public void register(BeanContextInternalFrame frame) { ! desktop.add(((JInternalFrame) frame.getComponent())); ! frames.add(frame); } /** ! * Description of the Method * ! * @param bcs Description of Parameter ! * @param requestor Description of Parameter ! * @param service Description of Parameter */ ! public void releaseService(BeanContextServices bcs, Object requestor, Object service) { } /** ! * Description of the Method * ! * @param l Description of Parameter */ public void removeWindowListener(WindowListener l) *************** *** 206,237 **** /** ! * Description of the Method * ! * @param menuBar Description of Parameter */ ! public void update(JMenuBar menuBar) { ! this.frame.setJMenuBar(menuBar); ! this.frame.setVisible(true); } - /** ! * Description of the Method * ! * @param frame Description of Parameter */ ! public void register(BeanContextInternalFrame frame) { ! desktop.add(((JInternalFrame) frame.getComponent())); ! frames.add(frame); } /** ! * Description of the Method * ! * @param frame Description of Parameter */ public void unregister(BeanContextInternalFrame frame) --- 226,254 ---- /** ! * Sets the content attribute of the FrameServiceProvider object * ! * @param c The new content value */ ! public void setContent(Container c) { ! this.content = c; } /** ! * Setter for the title attribute * ! * @param title The new value */ ! public void setTitle(String title) { ! this.frame.setTitle(title); } /** ! * Description of the Method * ! * @param frame Description of Parameter */ public void unregister(BeanContextInternalFrame frame) *************** *** 243,343 **** /** ! * Description of the Method ! * ! * @param frame Description of Parameter ! */ ! public void activate(BeanContextInternalFrame frame) ! { ! desktop.getDesktopManager().activateFrame(((JInternalFrame) frame.getComponent())); ! try ! { ! ((JInternalFrame) frame.getComponent()).setSelected(true); ! } ! catch (PropertyVetoException e) ! { ! } ! } ! ! ! /** ! * Description of the Method ! * ! * @param bcs Description of Parameter ! * @param requestor Description of Parameter ! * @param service Description of Parameter ! */ ! public void releaseService(BeanContextServices bcs, Object requestor, Object service) ! { ! } ! ! ! /** ! * Description of the Method ! * ! * @param context Description of Parameter ! */ ! protected void register(BeanContextServices context) ! { ! // Set up MenuBar ! if (context.hasService(MenuBarService.class)) ! { ! cat.debug("Using service MenuBarService..."); ! try ! { ! MenuBarService service = (MenuBarService) context.getService(this, this, MenuBarService.class, this.frame, this); ! service.addMenuBarListener(this); ! } ! catch (Exception e) ! { ! cat.error("Error during utilisation of service MenuBarService (" + e.getMessage() + ")"); ! e.printStackTrace(); ! } ! } ! ! // Set up ToolBar ! if (context.hasService(ToolBarService.class)) ! { ! cat.debug("Using service ToolBarService..."); ! try ! { ! ToolBarService service = (ToolBarService) context.getService(this, this, ToolBarService.class, this.frame, this); ! frame.getContentPane().add("North", service.getContainer()); ! } ! catch (Exception e) ! { ! cat.error("Error during utilisation of service ToolBarService (" + e.getMessage() + ")"); ! e.printStackTrace(); ! } ! } ! ! // Set up StatusBar ! if (context.hasService(StatusBarService.class)) ! { ! cat.debug("Using service StatusBarService..."); ! try ! { ! StatusBarService service = (StatusBarService) context.getService(this, this, StatusBarService.class, this.frame, this); ! frame.getContentPane().add("South", service.getContainer()); ! } ! catch (Exception e) ! { ! cat.error("Error during utilisation of service StatusBarService (" + e.getMessage() + ")"); ! e.printStackTrace(); ! } ! } ! } ! ! ! /** ! * Description of the Method * ! * @param context Description of Parameter */ ! protected void unregister(BeanContextServices context) { } ! /** Description of the Method */ protected void initializeBeanContextResources() { --- 260,275 ---- /** ! * Description of the Method * ! * @param menuBar Description of Parameter */ ! public void update(JMenuBar menuBar) { + this.frame.setJMenuBar(menuBar); + this.frame.setVisible(true); } ! /** Description of the Method */ protected void initializeBeanContextResources() { *************** *** 423,427 **** ! /** Description of the Method */ protected void releaseBeanContextResources() { --- 355,416 ---- ! /** ! * Description of the Method ! * ! * @param context Description of Parameter ! */ ! protected void register(BeanContextServices context) ! { ! // Set up MenuBar ! if (context.hasService(MenuBarService.class)) ! { ! cat.debug("Using service MenuBarService..."); ! try ! { ! MenuBarService service = (MenuBarService) context.getService(this, this, MenuBarService.class, this.frame, this); ! service.addMenuBarListener(this); ! } ! catch (Exception e) ! { ! cat.error("Error during utilisation of service MenuBarService (" + e.getMessage() + ")"); ! e.printStackTrace(); ! } ! } ! ! // Set up ToolBar ! if (context.hasService(ToolBarService.class)) ! { ! cat.debug("Using service ToolBarService..."); ! try ! { ! ToolBarService service = (ToolBarService) context.getService(this, this, ToolBarService.class, this.frame, this); ! frame.getContentPane().add("North", service.getContainer()); ! } ! catch (Exception e) ! { ! cat.error("Error during utilisation of service ToolBarService (" + e.getMessage() + ")"); ! e.printStackTrace(); ! } ! } ! ! // Set up StatusBar ! if (context.hasService(StatusBarService.class)) ! { ! cat.debug("Using service StatusBarService..."); ! try ! { ! StatusBarService service = (StatusBarService) context.getService(this, this, StatusBarService.class, this.frame, this); ! frame.getContentPane().add("South", service.getContainer()); ! } ! catch (Exception e) ! { ! cat.error("Error during utilisation of service StatusBarService (" + e.getMessage() + ")"); ! e.printStackTrace(); ! } ! } ! } ! ! ! /** Description of the Method */ protected void releaseBeanContextResources() { *************** *** 438,441 **** --- 427,438 ---- cat.debug("FrameService removed"); } + + + /** + * Description of the Method + * + * @param context Description of Parameter + */ + protected void unregister(BeanContextServices context) { } } Index: HistoryService.java =================================================================== RCS file: /cvsroot/ejtools/libraries/adwt/src/main/net/sourceforge/ejtools/awt/services/HistoryService.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** HistoryService.java 30 Apr 2002 21:06:19 -0000 1.2 --- HistoryService.java 5 May 2002 20:13:46 -0000 1.3 *************** *** 10,27 **** /** ! * Description of the Class * ! * @author letiemble ! * @created 25 octobre 2001 ! * @version $Revision$ ! * @todo Javadoc to complete */ public interface HistoryService { /** ! * Description of the Method * ! * @param url Description of Parameter ! * @param context Description of Parameter */ public void push(URL url, Object context); --- 10,27 ---- /** ! * Description of the Class * ! * @author letiemble ! * @created 25 octobre 2001 ! * @version $Revision$ ! * @todo Javadoc to complete */ public interface HistoryService { /** ! * Description of the Method * ! * @param url Description of Parameter ! * @param context Description of Parameter */ public void push(URL url, Object context); *************** *** 29,44 **** /** ! * Description of the Class * ! * @author letiembl ! * @created 7 novembre 2001 */ public interface Holder { /** ! * Description of the Method * ! * @param url Description of Parameter ! * @param context Description of Parameter */ public void loadResource(URL url, Object context); --- 29,44 ---- /** ! * Description of the Class * ! * @author letiembl ! * @created 7 novembre 2001 */ public interface Holder { /** ! * Description of the Method * ! * @param url Description of Parameter ! * @param context Description of Parameter */ public void loadResource(URL url, Object context); Index: HistoryServiceProvider.java =================================================================== RCS file: /cvsroot/ejtools/libraries/adwt/src/main/net/sourceforge/ejtools/awt/services/HistoryServiceProvider.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** HistoryServiceProvider.java 30 Apr 2002 21:06:19 -0000 1.2 --- HistoryServiceProvider.java 5 May 2002 20:13:46 -0000 1.3 *************** *** 24,57 **** /** ! * Description of the Class * ! * @author letiemble ! * @created 2 novembre 2001 ! * @version $Revision$ ! * @todo Javadoc to complete */ public class HistoryServiceProvider extends BeanContextServicesSupport implements BeanContextServiceProvider, HistoryService { ! /** Description of the Field */ ! private final static int MAX_WIDTH = 30; ! /** Description of the Field */ ! private static Category cat = Category.getInstance(HistoryServiceProvider.class.getName()); ! /** Description of the Field */ ! private HistoryService service = null; ! /** Description of the Field */ ! private LimitedStack stack = null; ! /** Description of the Field */ ! private Vector menus = null; ! /** Description of the Field */ private HistoryService.Holder holder = null; ! /** Description of the Field */ private int maxHistory; /** ! * Constructor for the HistoryServiceProvider object * ! * @param maxHistory Description of Parameter ! * @param holder Description of Parameter */ public HistoryServiceProvider(HistoryService.Holder holder, int maxHistory) --- 24,57 ---- /** ! * Description of the Class * ! * @author letiemble ! * @created 2 novembre 2001 ! * @version $Revision$ ! * @todo Javadoc to complete */ public class HistoryServiceProvider extends BeanContextServicesSupport implements BeanContextServiceProvider, HistoryService { ! /** Description of the Field */ private HistoryService.Holder holder = null; ! /** Description of the Field */ private int maxHistory; + /** Description of the Field */ + private Vector menus = null; + /** Description of the Field */ + private HistoryService service = null; + /** Description of the Field */ + private LimitedStack stack = null; + /** Description of the Field */ + private static Category cat = Category.getInstance(HistoryServiceProvider.class.getName()); + /** Description of the Field */ + private final static int MAX_WIDTH = 30; /** ! * Constructor for the HistoryServiceProvider object * ! * @param maxHistory Description of Parameter ! * @param holder Description of Parameter */ public HistoryServiceProvider(HistoryService.Holder holder, int maxHistory) *************** *** 66,90 **** /** ! * Gets the service attribute of the HistoryServiceProvider object ! * ! * @param bcs Description of Parameter ! * @param requestor Description of Parameter ! * @param serviceClass Description of Parameter ! * @param serviceSelector Description of Parameter ! * @return The service value ! */ ! public Object getService(BeanContextServices bcs, Object requestor, Class serviceClass, Object serviceSelector) ! { ! return service; ! } ! ! ! /** ! * Gets the currentServiceSelectors attribute of the HistoryServiceProvider ! * object * ! * @param bcs Description of Parameter ! * @param serviceClass Description of Parameter ! * @return The currentServiceSelectors value */ public Iterator getCurrentServiceSelectors(BeanContextServices bcs, Class serviceClass) --- 66,75 ---- /** ! * Gets the currentServiceSelectors attribute of the HistoryServiceProvider ! * object * ! * @param bcs Description of Parameter ! * @param serviceClass Description of Parameter ! * @return The currentServiceSelectors value */ public Iterator getCurrentServiceSelectors(BeanContextServices bcs, Class serviceClass) *************** *** 95,114 **** /** ! * Description of the Method * ! * @param bcs Description of Parameter ! * @param requestor Description of Parameter ! * @param service Description of Parameter */ ! public void releaseService(BeanContextServices bcs, Object requestor, Object service) { } /** ! * Description of the Method * ! * @param url Description of Parameter ! * @param context Description of Parameter */ public void push(URL url, Object context) --- 80,102 ---- /** ! * Gets the service attribute of the HistoryServiceProvider object * ! * @param bcs Description of Parameter ! * @param requestor Description of Parameter ! * @param serviceClass Description of Parameter ! * @param serviceSelector Description of Parameter ! * @return The service value */ ! public Object getService(BeanContextServices bcs, Object requestor, Class serviceClass, Object serviceSelector) { + return service; } /** ! * Description of the Method * ! * @param url Description of Parameter ! * @param context Description of Parameter */ public void push(URL url, Object context) *************** *** 138,142 **** ! /** Description of the Method */ protected void initializeBeanContextResources() { --- 126,140 ---- ! /** ! * Description of the Method ! * ! * @param bcs Description of Parameter ! * @param requestor Description of Parameter ! * @param service Description of Parameter ! */ ! public void releaseService(BeanContextServices bcs, Object requestor, Object service) { } ! ! ! /** Description of the Method */ protected void initializeBeanContextResources() { *************** *** 168,172 **** ! /** Description of the Method */ protected void releaseBeanContextResources() { --- 166,170 ---- ! /** Description of the Method */ protected void releaseBeanContextResources() { *************** *** 178,234 **** /** ! * Description of the Class * ! * @author letiembl ! * @created 7 novembre 2001 */ ! private class HistoryContext { ! /** Description of the Field */ ! private URL url; ! /** Description of the Field */ ! private Object context; /** ! * Constructor for the HistoryContext object * ! * @param url Description of Parameter ! * @param context Description of Parameter */ ! public HistoryContext(URL url, Object context) { ! this.url = url; ! this.context = context; } ! /** ! * Gets the uRL attribute of the HistoryContext object ! * ! * @return The uRL value ! */ ! public URL getURL() { ! return this.url; } /** ! * Gets the context attribute of the HistoryContext object * ! * @return The context value */ ! public Object getContext() { ! return this.context; } /** ! * Description of the Method * ! * @param o Description of Parameter ! * @return Description of the Returned Value */ public boolean equals(Object o) --- 176,243 ---- /** ! * Description of the Class * ! * @author letiembl ! * @created 7 novembre 2001 */ ! private class FileHistoryCommand implements Command { ! /** Description of the Field */ ! private int position; /** ! * Constructor for the FileHistoryCommand object * ! * @param position Description of Parameter */ ! public FileHistoryCommand(int position) { ! this.position = position; } ! /** Description of the Method */ ! public void execute() { ! HistoryContext hc = (HistoryContext) HistoryServiceProvider.this.stack.elementAt(position); ! cat.info("Loading " + hc.getURL()); ! HistoryServiceProvider.this.holder.loadResource(hc.getURL(), hc.getContext()); } + } + + + /** + * Description of the Class + * + * @author letiembl + * @created 7 novembre 2001 + */ + private class HistoryContext + { + /** Description of the Field */ + private Object context; + /** Description of the Field */ + private URL url; /** ! * Constructor for the HistoryContext object * ! * @param url Description of Parameter ! * @param context Description of Parameter */ ! public HistoryContext(URL url, Object context) { ! this.url = url; ! this.context = context; } /** ! * Description of the Method * ! * @param o Description of Parameter ! * @return Description of the Returned Value */ public boolean equals(Object o) *************** *** 238,273 **** return ((HistoryContext) o).getURL().equals(this.url); } - } - - - /** - * Description of the Class - * - * @author letiembl - * @created 7 novembre 2001 - */ - private class FileHistoryCommand implements Command - { - /** Description of the Field */ - private int position; /** ! * Constructor for the FileHistoryCommand object * ! * @param position Description of Parameter */ ! public FileHistoryCommand(int position) { ! this.position = position; } ! /** Description of the Method */ ! public void execute() { ! HistoryContext hc = (HistoryContext) HistoryServiceProvider.this.stack.elementAt(position); ! cat.info("Loading " + hc.getURL()); ! HistoryServiceProvider.this.holder.loadResource(hc.getURL(), hc.getContext()); } } --- 247,271 ---- return ((HistoryContext) o).getURL().equals(this.url); } /** ! * Gets the context attribute of the HistoryContext object * ! * @return The context value */ ! public Object getContext() { ! return this.context; } ! /** ! * Gets the uRL attribute of the HistoryContext object ! * ! * @return The uRL value ! */ ! public URL getURL() { ! return this.url; } } Index: MDIDesktopPane.java =================================================================== RCS file: /cvsroot/ejtools/libraries/adwt/src/main/net/sourceforge/ejtools/awt/services/MDIDesktopPane.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** MDIDesktopPane.java 30 Apr 2002 21:06:19 -0000 1.2 --- MDIDesktopPane.java 5 May 2002 20:13:46 -0000 1.3 *************** *** 23,46 **** /** ! * An extension of WDesktopPane that supports often used MDI functionality. ! * This class also handles setting scroll bars for when windows move too far to ! * the left or bottom, providing the MDIDesktopPane is in a ScrollPane. * ! * @author letiemble ! * @created 29 décembre 2001 ! * @version $Revision$ ! * @todo Javadoc to complete */ public class MDIDesktopPane extends JDesktopPane { ! /** Description of the Field */ ! private static Category cat = Category.getInstance(MDIDesktopPane.class.getName()); ! /** Description of the Field */ ! private static int FRAME_OFFSET = 30; ! /** Description of the Field */ private MDIDesktopManager manager; ! /** Constructor for the MDIDesktopPane object */ public MDIDesktopPane() { --- 23,46 ---- /** ! * An extension of WDesktopPane that supports often used MDI functionality. This ! * class also handles setting scroll bars for when windows move too far to the ! * left or bottom, providing the MDIDesktopPane is in a ScrollPane. * ! * @author letiemble ! * @created 29 décembre 2001 ! * @version $Revision$ ! * @todo Javadoc to complete */ public class MDIDesktopPane extends JDesktopPane { ! /** Description of the Field */ private MDIDesktopManager manager; + /** Description of the Field */ + private static int FRAME_OFFSET = 30; + /** Description of the Field */ + private static Category cat = Category.getInstance(MDIDesktopPane.class.getName()); ! /** Constructor for the MDIDesktopPane object */ public MDIDesktopPane() { *************** *** 52,101 **** /** ! * Sets the Bounds attribute of the MDIDesktopPane object ! * ! * @param x The new Bounds value ! * @param y The new Bounds value ! * @param w The new Bounds value ! * @param h The new Bounds value ! */ ! public void setBounds(int x, int y, int w, int h) ! { ! super.setBounds(x, y, w, h); ! checkDesktopSize(); ! } ! ! ! /** ! * Sets all component size properties ( maximum, minimum, preferred) to the ! * given dimension. ! * ! * @param d The new AllSize value ! */ ! public void setAllSize(Dimension d) ! { ! setMinimumSize(d); ! setMaximumSize(d); ! setPreferredSize(d); ! } ! ! ! /** ! * Sets all component size properties ( maximum, minimum, preferred) to the ! * given width and height. ! * ! * @param width The new AllSize value ! * @param height The new AllSize value ! */ ! public void setAllSize(int width, int height) ! { ! setAllSize(new Dimension(width, height)); ! } ! ! ! /** ! * Description of the Method * ! * @param frame Description of Parameter ! * @return Description of the Returned Value */ public Component add(JInternalFrame frame) --- 52,59 ---- /** ! * Description of the Method * ! * @param frame Description of Parameter ! * @return Description of the Returned Value */ public Component add(JInternalFrame frame) *************** *** 147,163 **** ! /** ! * Description of the Method ! * ! * @param c Description of Parameter ! */ ! public void remove(Component c) ! { ! super.remove(c); ! checkDesktopSize(); ! } ! ! ! /** Cascade all internal frames */ public void cascadeFrames() { --- 105,109 ---- ! /** Cascade all internal frames */ public void cascadeFrames() { *************** *** 179,183 **** ! /** Tile all internal frames */ public void tileFrames() { --- 125,183 ---- ! /** ! * Description of the Method ! * ! * @param c Description of Parameter ! */ ! public void remove(Component c) ! { ! super.remove(c); ! checkDesktopSize(); ! } ! ! ! /** ! * Sets all component size properties ( maximum, minimum, preferred) to the ! * given dimension. ! * ! * @param d The new AllSize value ! */ ! public void setAllSize(Dimension d) ! { ! setMinimumSize(d); ! setMaximumSize(d); ! setPreferredSize(d); ! } ! ! ! /** ! * Sets all component size properties ( maximum, minimum, preferred) to the ! * given width and height. ! * ! * @param width The new AllSize value ! * @param height The new AllSize value ! */ ! public void setAllSize(int width, int height) ! { ! setAllSize(new Dimension(width, height)); ! } ! ! ! /** ! * Sets the Bounds attribute of the MDIDesktopPane object ! * ! * @param x The new Bounds value ! * @param y The new Bounds value ! * @param w The new Bounds value ! * @param h The new Bounds value ! */ ! public void setBounds(int x, int y, int w, int h) ! { ! super.setBounds(x, y, w, h); ! checkDesktopSize(); ! } ! ! ! /** Tile all internal frames */ public void tileFrames() { *************** *** 195,199 **** ! /** Description of the Method */ private void checkDesktopSize() { --- 195,199 ---- ! /** Description of the Method */ private void checkDesktopSize() { *************** *** 206,225 **** /** ! * Private class used to replace the standard DesktopManager for ! * JDesktopPane. Used to provide scrollbar functionality. * ! * @author laurent ! * @created 29 décembre 2001 */ class MDIDesktopManager extends DefaultDesktopManager { ! /** Description of the Field */ private MDIDesktopPane desktop; /** ! * Constructor for the MDIDesktopManager object * ! * @param desktop Description of Parameter */ public MDIDesktopManager(MDIDesktopPane desktop) --- 206,225 ---- /** ! * Private class used to replace the standard DesktopManager for ! * JDesktopPane. Used to provide scrollbar functionality. * ! * @author laurent ! * @created 29 décembre 2001 */ class MDIDesktopManager extends DefaultDesktopManager { ! /** Description of the Field */ private MDIDesktopPane desktop; /** ! * Constructor for the MDIDesktopManager object * ! * @param desktop Description of Parameter */ public MDIDesktopManager(MDIDesktopPane desktop) *************** *** 230,234 **** /** ! * Sets the NormalSize attribute of the MDIDesktopManager object */ public void setNormalSize() --- 230,258 ---- /** ! * Description of the Method ! * ! * @param f Description of Parameter ! */ ! public void endDraggingFrame(JComponent f) ! { ! super.endDraggingFrame(f); ! resizeDesktop(); ! } ! ! ! /** ! * Description of the Method ! * ! * @param f Description of Parameter ! */ ! public void endResizingFrame(JComponent f) ! { ! super.endResizingFrame(f); ! resizeDesktop(); ! } ! ! ! /** ! * Sets the NormalSize attribute of the MDIDesktopManager object */ public void setNormalSize() *************** *** 256,284 **** ! /** ! * Description of the Method ! * ! * @param f Description of Parameter ! */ ! public void endResizingFrame(JComponent f) ! { ! super.endResizingFrame(f); ! resizeDesktop(); ! } ! ! ! /** ! * Description of the Method ! * ! * @param f Description of Parameter ! */ ! public void endDraggingFrame(JComponent f) ! { ! super.endDraggingFrame(f); ! resizeDesktop(); ! } ! ! ! /** Description of the Method */ protected void resizeDesktop() { --- 280,284 ---- ! /** Description of the Method */ protected void resizeDesktop() { *************** *** 325,362 **** /** ! * Gets the ScrollPaneInsets attribute of the MDIDesktopManager object * ! * @return The ScrollPaneInsets value */ ! private Insets getScrollPaneInsets() { ! JScrollPane scrollPane = getScrollPane(); ! if (scrollPane == null) ! { ! return new Insets(0, 0, 0, 0); ! } ! else { ! return getScrollPane().getBorder().getBorderInsets(scrollPane); } } /** ! * Gets the ScrollPane attribute of the MDIDesktopMan... [truncated message content] |