avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hamm...@apache.org
Subject cvs commit: jakarta-avalon-cornerstone/apps/jesktop/src/java/org/apache/avalon/jesktop/windowmanagers/windoze WindozeWindowManager.java WindozeWindowManager1.java WindozeWindowManager2.java
Date Mon, 26 Nov 2001 19:30:14 GMT
hammant     01/11/26 11:30:14

  Modified:    apps/jesktop/src/java/org/apache/avalon/jesktop/windowmanagers/windoze
                        WindozeWindowManager.java
                        WindozeWindowManager1.java
                        WindozeWindowManager2.java
  Log:
  backdrop to desktop renders again
  
  Revision  Changes    Path
  1.6       +10 -2     jakarta-avalon-cornerstone/apps/jesktop/src/java/org/apache/avalon/jesktop/windowmanagers/windoze/WindozeWindowManager.java
  
  Index: WindozeWindowManager.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-cornerstone/apps/jesktop/src/java/org/apache/avalon/jesktop/windowmanagers/windoze/WindozeWindowManager.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- WindozeWindowManager.java	2001/11/10 21:34:05	1.5
  +++ WindozeWindowManager.java	2001/11/26 19:30:13	1.6
  @@ -309,11 +309,14 @@
       }
   
       protected void setBackdrop(final String bPath, final String type) {
  -
           try {
               mBackgroundImage = new ImageIcon(new URL(bPath)).getImage();
               this.mBackgroundType = type;
   
  +            frame.invalidate();
  +
  +            setBackdrop2(bPath, type);
  +
               frame.repaint();
   
               //        getRepaintable().repaint();
  @@ -322,6 +325,8 @@
           }
       }
   
  +    protected abstract void setBackdrop2(final String bPath, final String type);
  +
       protected void paintComponentHelper(final Graphics g, final JComponent repaintable)
{
   
           if (mBackgroundImage != null) {
  @@ -360,6 +365,7 @@
       public void setConfig(final String configPath, final Document config) {
   
           if (configPath.equals("desktop/settings")) {
  +
               Element root = config.getDocumentElement();
               NodeList nodes = root.getElementsByTagName("backdrop");
   
  @@ -371,8 +377,10 @@
   
                   String bdfile = nodes2.item(0).getNodeValue();    // the value of the text
node
   
  -                setBackdrop(bdfile, elem.getAttribute("mBackgroundType"));
  +                setBackdrop(bdfile, elem.getAttribute("type"));
  +            } else {
               }
  +
           }
       }
   
  
  
  
  1.3       +24 -30    jakarta-avalon-cornerstone/apps/jesktop/src/java/org/apache/avalon/jesktop/windowmanagers/windoze/WindozeWindowManager1.java
  
  Index: WindozeWindowManager1.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-cornerstone/apps/jesktop/src/java/org/apache/avalon/jesktop/windowmanagers/windoze/WindozeWindowManager1.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- WindozeWindowManager1.java	2001/10/10 15:50:57	1.2
  +++ WindozeWindowManager1.java	2001/11/26 19:30:13	1.3
  @@ -19,6 +19,7 @@
   import java.awt.BorderLayout;
   import java.awt.Graphics;
   import java.awt.Color;
  +import java.awt.Component;
   
   
   /**
  @@ -26,13 +27,12 @@
    *
    *
    * @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
  - * @version $Revision: 1.2 $
  + * @version $Revision: 1.3 $
    */
   public class WindozeWindowManager1 extends WindozeWindowManager {
   
       private JInternalFrameFrimbleFactory mFrimbleFactory;
       protected JDesktopPane mDesktopPane = new JInternalFrameFrimbleDesktopPane();
  -    protected DesktopPanel mDesktopPanel = new DesktopPanel();
       protected Integer LAYER = new Integer(2);
   
       /**
  @@ -60,13 +60,14 @@
           return mFrimbleFactory.getFrimble(title);
       }
   
  -    protected void setBackdrop(final String bPath, final String type) {
  -
  -        super.setBackdrop(bPath, type);
  +    protected final void setBackdrop2(final String bPath, final String type) {
           mDesktopPane.invalidate();
           mDesktopPane.repaint();
       }
   
  +
  +
  +
       /**
        * Method setup
        *
  @@ -76,7 +77,6 @@
   
           super.initializeView2();
           frame.getContentPane().add(mDesktopPane, BorderLayout.CENTER);
  -        mDesktopPane.getRootPane().add(mDesktopPanel, BorderLayout.CENTER);
           mDesktopPane.invalidate();
           mDesktopPane.repaint();
           frame.setVisible(true);
  @@ -84,48 +84,42 @@
   
       protected void acceptLaunchableTarget(final LaunchableTarget lTarget, final Point pt)
{
   
  -        SwingUtilities.convertPointFromScreen(pt, mDesktopPanel);
  +        SwingUtilities.convertPointFromScreen(pt, mDesktopPane);
   
           LaunchableTargetLabel ltl = new LaunchableTargetLabel(lTarget);
   
  -        mDesktopPanel.add(ltl);
  -        ltl.setBounds(pt.x, pt.y, (int) ltl.getPreferredSize().getWidth(),
  -                      (int) ltl.getPreferredSize().getHeight());
  -        ltl.setVisible(true);
  +        //mDesktopPanel.add(ltl);
  +        //ltl.setBounds(pt.x, pt.y, (int) ltl.getPreferredSize().getWidth(),
  +         //             (int) ltl.getPreferredSize().getHeight());
  +        //ltl.setVisible(true);
   
       }
   
       /**
  -     * Class DesktopPanel
  +     * Class JInternalFrameFrimbleDesktopPane
        *
        *
        * @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
  -     * @version $Revision: 1.2 $
  +     * @version $Revision: 1.3 $
        */
  -    class DesktopPanel extends JPanel {
  +    class JInternalFrameFrimbleDesktopPane extends JDesktopPane {
   
  -        /**
  -         * Constructor DesktopPanel
  -         *
  -         *
  -         */
  -        DesktopPanel() {
  -            this.setLayout(null);
  +        public JInternalFrameFrimbleDesktopPane() {
               setBackground(new Color(57, 109, 165));    // windows(tm) blue.
           }
   
  +
  +        public void repaint() {
  +            super.repaint();
  +        }
  +
  +        public void paint(final Graphics g) {
  +            super.paint(g);
  +        }
  +
           protected void paintComponent(final Graphics g) {
               super.paintComponent(g);
               paintComponentHelper(g, this);
           }
       }
  -
  -    /**
  -     * Class JInternalFrameFrimbleDesktopPane
  -     *
  -     *
  -     * @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
  -     * @version $Revision: 1.2 $
  -     */
  -    class JInternalFrameFrimbleDesktopPane extends JDesktopPane {}
   }
  
  
  
  1.2       +3 -3      jakarta-avalon-cornerstone/apps/jesktop/src/java/org/apache/avalon/jesktop/windowmanagers/windoze/WindozeWindowManager2.java
  
  Index: WindozeWindowManager2.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-cornerstone/apps/jesktop/src/java/org/apache/avalon/jesktop/windowmanagers/windoze/WindozeWindowManager2.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- WindozeWindowManager2.java	2001/09/08 17:42:54	1.1
  +++ WindozeWindowManager2.java	2001/11/26 19:30:13	1.2
  @@ -24,7 +24,7 @@
    *
    *
    * @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
  - * @version $Revision: 1.1 $
  + * @version $Revision: 1.2 $
    */
   public class WindozeWindowManager2 extends WindozeWindowManager {
   
  @@ -71,7 +71,7 @@
           return mFrimbleFactory.getFrimble(title);
       }
   
  -    protected void setBackdrop(final String bPath, final String type) {}
  +    protected void setBackdrop2(final String bPath, final String type) {}
   
       /**
        * Method updateComponentTreeUI
  @@ -91,7 +91,7 @@
        *
        *
        * @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
  -     * @version $Revision: 1.1 $
  +     * @version $Revision: 1.2 $
        */
       class JFrameFrimblePanel extends JPanel {
   
  
  
  

--
To unsubscribe, e-mail:   <mailto:avalon-cvs-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-cvs-help@jakarta.apache.org>


Mime
View raw message