[Spedit-commits] CVS: prototype/Sources/net/sourceforge/spedit/ui AttributesDisplay.java,1.5,1.6 Wra
Status: Planning
Brought to you by:
krunte
|
From: S?bastien P. <kaz...@us...> - 2001-12-04 16:37:32
|
Update of /cvsroot/spedit/prototype/Sources/net/sourceforge/spedit/ui
In directory usw-pr-cvs1:/tmp/cvs-serv21181/net/sourceforge/spedit/ui
Modified Files:
AttributesDisplay.java WrapperView.java
Log Message:
New element menu, add element bug fix.
Index: AttributesDisplay.java
===================================================================
RCS file: /cvsroot/spedit/prototype/Sources/net/sourceforge/spedit/ui/AttributesDisplay.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** AttributesDisplay.java 2001/11/28 14:52:50 1.5
--- AttributesDisplay.java 2001/12/04 16:37:29 1.6
***************
*** 34,37 ****
--- 34,38 ----
import java.awt.*;
+ import java.awt.event.*;
import java.awt.geom.*;
import javax.swing.*;
***************
*** 75,78 ****
--- 76,82 ----
this.view = view;
this.element = element;
+ //This seems strange but this actually fetches the DocumentFrame ;)
+ // JEditorPane->JViewPort->JScrollPane->JSplitBar->JPanel->JLayeredPane->JRootPane->DocumentFrame
+ //addMouseListener((MouseListener)view.getContainer().getParent().getParent().getParent().getParent().getParent().getParent().getParent());
setFont(view.getStyleSheet().font);
}
***************
*** 124,128 ****
else
{
! return element.getXMLElement().getAttributes().size();
}
--- 128,132 ----
else
{
! return element.getXMLElement().getAttributes().size();;
}
Index: WrapperView.java
===================================================================
RCS file: /cvsroot/spedit/prototype/Sources/net/sourceforge/spedit/ui/WrapperView.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** WrapperView.java 2001/11/27 10:31:41 1.5
--- WrapperView.java 2001/12/04 16:37:30 1.6
***************
*** 93,99 ****
protected Rectangle2D viewBounds=null;
protected boolean refreshBounds=true;
! private final Image icn_exp = new ImageIcon("../Support/icon-expanded.gif").getImage();
! private final Image icn_clp = new ImageIcon("../Support/icon-collapsed.gif").getImage();
//-------------------------------------------------------------------------
--- 93,101 ----
protected Rectangle2D viewBounds=null;
protected boolean refreshBounds=true;
+ protected boolean blinkState=true;
! protected final Image icn_exp = new ImageIcon("../Support/icon-expanded.gif").getImage();
! protected final Image icn_clp = new ImageIcon("../Support/icon-collapsed.gif").getImage();
!
//-------------------------------------------------------------------------
***************
*** 159,163 ****
*/
! public void paint(Graphics g, Shape s)
{
Graphics2D gg=(Graphics2D)g;
--- 161,165 ----
*/
! public synchronized void paint(Graphics g, Shape s)
{
Graphics2D gg=(Graphics2D)g;
***************
*** 186,196 ****
gg.draw(r);
}
-
- //We paint a specific color if the element has been newly created
- if (((XMLNode)element).hasInformation() && ((XMLNode)element).getInformation().isNewlyCreated() )
- {
- g.setColor(new Color(240,200,150));
- gg.fill(r);
- }
//We draw the border
--- 188,191 ----
***************
*** 204,207 ****
--- 199,208 ----
}
+ if ( element instanceof XMLElementWrapper && ((XMLElementWrapper)element).isNewlyCreated )
+ {
+ g.setColor(new Color(199,250,199));
+ gg.fill(r);
+ }
+
//If the view is collapsed
if ( isCollapsed() )
***************
*** 627,631 ****
public void setSize(float width, float height)
! { nested.setSize(width,height); }
//-------------------------------------------------------------------------
--- 628,634 ----
public void setSize(float width, float height)
! {
! nested.setSize(width,height);
! }
//-------------------------------------------------------------------------
|