Revision 10747 branches/v10/applications/appgvSIG/src/com/iver/cit/gvsig/project/documents/view/gui/BaseView.java

View differences:

BaseView.java
40 40
 */
41 41
package com.iver.cit.gvsig.project.documents.view.gui;
42 42

  
43
import java.awt.Graphics;
43 44
import java.awt.image.BufferedImage;
44 45

  
45 46
import javax.swing.JPanel;
......
80 81

  
81 82
  protected boolean isPalette=false;
82 83
  protected MapOverViewPalette movp;
83
  protected JSplitPane tempMainSplit, tempSplitToc=null;
84
  
85
  
84
  protected ViewSplitPane tempMainSplit=null;
85
  protected JSplitPane tempSplitToc=null;
86

  
87

  
86 88
  protected WindowData windowData = null;
87 89

  
88 90
  // OVERRIDE THESE
89 91
  public void windowActivated() {}
90 92
  public void toPalette() {}
91 93
  public void restore() {}
94
  protected class ViewSplitPane extends JSplitPane{
95
	  private int lastDivider=0;
96
		public ViewSplitPane(int horizontal_split) {
97
			super(horizontal_split);
98
		}
92 99

  
100
		protected void paintChildren(Graphics g) {
101
			if (lastDivider!=lastDividerLocation){
102
				System.out.println("paintChildren = "+this.lastDividerLocation);
103
				getMapControl().getMapContext().clearAllCachingImageDrawnLayers();
104
				lastDivider=lastDividerLocation;
105
			}
106
			super.paintChildren(g);
107
		}
93 108

  
109
	}
110

  
94 111
  /**
95 112
   * Creates a new View object. Before using it, it must be initialized
96 113
   * using the <code>initialize()</code> method.
97
   * 
114
   *
98 115
   * @see initialize()
99 116
   */
100 117
  public BaseView() {
101 118

  
102 119
  }
103
  
120

  
104 121
  /**
105 122
   * Create the internal componentes and populate the window with them.
106 123
   * If the layout properties were set using the
......
140 157
		if (movp!=null)
141 158
			PluginServices.getMDIManager().closeWindow(movp);
142 159
		///PluginServices.getMainFrame().getStatusBar().setMessage("1","");
143
		
160

  
144 161
		if (modelo != null)
145 162
			modelo.storeWindowData(getWindowData());
146 163
	}
......
241 258
		updateWindowData();
242 259
		return windowData;
243 260
	}
244
	
261

  
245 262
	private void updateWindowData() {
246 263
		if (windowData == null)
247 264
			windowData = new WindowData();
......
249 266
		windowData.set("MainWindow.Y", Integer.toString(this.getY()));
250 267
		windowData.set("MainWindow.Width", Integer.toString(this.getWidth()));
251 268
		windowData.set("MainWindow.Height", Integer.toString(this.getHeight()));
252
		
269

  
253 270
		windowData.set("MainDivider.Location", Integer.toString(tempMainSplit.getDividerLocation()));
254 271
		windowData.set("MainDivider.X", Integer.toString(tempMainSplit.getX()));
255 272
		windowData.set("MainDivider.Y", Integer.toString(tempMainSplit.getY()));
256 273
		windowData.set("MainDivider.Width", Integer.toString(tempMainSplit.getWidth()));
257 274
		windowData.set("MainDivider.Height", Integer.toString(tempMainSplit.getHeight()));
258
		
275

  
259 276
		if (isPalette())
260 277
			windowData.set("GraphicLocator.isPalette", "true");
261 278
		else {
......
282 299
		}
283 300

  
284 301
	}
285
	
302

  
286 303
	public void setWindowData(WindowData data) {
287 304
		windowData = data;
288 305
	}

Also available in: Unified diff