Ticket #1968: pwa-centering-Page-work-area-should-be-centered.patch
File pwa-centering-Page-work-area-should-be-centered.patch, 28.1 KB (added by tanya, 15 years ago) |
---|
-
modules/org.sophie2.main.app.halos/src/main/java/org/sophie2/main/app/halos/frame/rotate/FrameRotateHaloButton.java
### Eclipse Workspace Patch 1.0 #P sophie
48 48 final FrameH frame = frameView.model().get(); 49 49 final double oldAngle = frame.getRotationAngle(); 50 50 51 PageWorkArea pwa = AppHaloUtil.getWorkArea(this);51 final PageWorkArea pwa = AppHaloUtil.getWorkArea(this); 52 52 final Scene scene = pwa.scene().get(); 53 53 final ImmMatrix sceneToParent = SceneHelper.getElementToSceneTransform(scene, 54 54 frameView.parent().get().sceneElement().get()).inverse(); … … 75 75 @Override 76 76 public void shouldMove(int newX, int newY) { 77 77 78 pwa.mouseCaptureOn().set(Boolean.TRUE); 79 78 80 ImmPoint newP = sceneToParent.transform(new ImmPoint(newX, newY)); 79 81 // offset in our space 80 82 ImmSize offset = newP.minus(zero); … … 93 95 // set the focus to the scene 94 96 sceneVisual.swingComponent().get().requestFocusInWindow(); 95 97 sceneVisual.swingComponent().get().requestFocus(); 98 99 pwa.mouseCaptureOn().set(Boolean.FALSE); 96 100 } 97 101 98 102 private void templatedRotation(final double newAngle, -
modules/org.sophie2.base.layout/src/test/java/org/sophie2/base/layout/model/LayoutDemo.java
1 package org.sophie2.base.layout.model; 2 3 import java.awt.BorderLayout; 4 5 import javax.swing.JDesktopPane; 6 import javax.swing.JFrame; 7 import javax.swing.JInternalFrame; 8 import javax.swing.JLayeredPane; 9 10 /** 11 * Demo for demonstrating the usage of {@link CustomLayout}. 12 * @author tanya 13 */ 14 public class LayoutDemo { 15 16 /** 17 * Constructor that creates {@link JFrame}, adds a {@link JDesktopPane} with 18 * {@link CustomLayout} and set different layers to be with different 19 * layouts. 20 */ 21 public LayoutDemo() { 22 23 JFrame frame = new JFrame(); 24 frame.setSize(300, 300); 25 frame.setVisible(true); 26 27 JDesktopPane pane = new JDesktopPane(); 28 29 frame.setContentPane(pane); 30 pane.setLayout(new CustomLayout(new BorderLayout())); 31 32 JInternalFrame frame1 = new JInternalFrame(); 33 frame1.setLocation(10, 10); 34 frame1.setSize(90, 90); 35 frame1.setVisible(true); 36 37 pane.setLayer(frame1, JLayeredPane.DEFAULT_LAYER); 38 39 pane.add(frame1, BorderLayout.CENTER); 40 41 JInternalFrame frame2 = new JInternalFrame(); 42 frame2.setLocation(110, 110); 43 frame2.setSize(90, 90); 44 frame2.setVisible(true); 45 46 pane.setLayer(frame2, JLayeredPane.PALETTE_LAYER); 47 48 pane.add(frame2, CustomLayout.CUSTOM); 49 } 50 51 /** 52 * The main method. 53 * @param args 54 */ 55 public static void main(String args[]) { 56 new LayoutDemo(); 57 } 58 } 59 -
modules/org.sophie2.extra.func.annotations/src/main/java/org/sophie2/extra/func/annotations/view/halos/StickyMoveHaloButton.java
83 83 public void released() { 84 84 sv.wantedViewRect().set(null); 85 85 releaseAction(channel); 86 86 workArea().get().mouseCaptureOn().set(Boolean.FALSE); 87 87 } 88 88 89 89 @Override 90 90 public void shouldMove(final int newX, final int newY) { 91 workArea().get().mouseCaptureOn().set(Boolean.TRUE); 91 92 moveAction(channel, newX, newY); 92 93 } 93 94 }; -
modules/org.sophie2.base.scene/src/main/java/org/sophie2/base/scene/interfaces/Scene.java
1 1 package org.sophie2.base.scene.interfaces; 2 2 3 3 import org.sophie2.base.commons.util.ImmColor; 4 import org.sophie2.base.commons.util.position.ImmRect; 4 5 import org.sophie2.base.scene.helpers.SceneHelper; 5 6 import org.sophie2.core.prolib.impl.BaseProObject; 6 7 import org.sophie2.core.prolib.interfaces.Prop; … … 35 36 * @return property 36 37 */ 37 38 public abstract Prop<? extends SceneElement> rootElement(); 39 40 /** 41 * The rectangle over which the actual view rectangle will be centered. 42 * 43 * @return property 44 */ 45 public abstract Prop<ImmRect> centeringRect(); 38 46 39 47 /** 40 48 * The background color of the scene. This is the infinite area that is -
modules/org.sophie2.base.scene/src/test/java/org/sophie2/base/scene/SceneDemo.java
475 475 476 476 public RwProp<ImmRect> actualViewRectCache() { 477 477 return getBean().makeValueProp("actualViewRectCache", ImmRect.class, null); 478 } 478 } 479 480 public RwProp<ImmPoint> translationPoint() { 481 // TODO Auto-generated method stub 482 return null; 483 } 479 484 } 480 485 481 486 /** -
modules/org.sophie2.base.scene/src/main/java/org/sophie2/base/scene/BaseSceneVisual.java
6 6 import javax.swing.JComponent; 7 7 8 8 import org.sophie2.base.commons.util.OSUtil; 9 import org.sophie2.base.commons.util.position.ImmPoint; 9 10 import org.sophie2.base.commons.util.position.ImmRect; 11 import org.sophie2.base.commons.util.position.ImmSize; 10 12 import org.sophie2.base.dnd.SophieDragDropHandler; 11 13 import org.sophie2.base.scene.helpers.ElementHelper; 12 14 import org.sophie2.base.scene.helpers.SceneHelper; … … 164 166 protected static final ImmRect DEFAULT_VIEW_RECT = 165 167 new ImmRect(0, 0, 256, 256); 166 168 169 public RwProp<ImmPoint> translationPoint() { 170 return getBean().makeValueProp("translationPoint", ImmPoint.class, ImmPoint.ZERO); 171 } 172 167 173 public Prop<ImmRect> actualViewRect() { 168 174 class actualViewRect extends AutoProperty<ImmRect> { 169 175 … … 177 183 && scene().get().rootElement().get() != null) { 178 184 ImmRect bound = SceneHelper.getBoundingRect(scene().get(), 179 185 scene().get().rootElement().get()); 186 187 res = bound; 188 ImmPoint oldLocation = res.getLocation(); 189 190 float before = Math.abs(res.getX()); 191 float after = res.getWidth() - scene().get().centeringRect().get().getWidth() - before; 192 float newWidth = Math.abs(after - before); 193 194 float top = Math.abs(res.getY()); 195 float bottom = res.getHeight() - scene().get().centeringRect().get().getHeight() - top; 196 float newHeight = Math.abs(top - bottom); 197 198 float locationX = 0f; 199 if(before < after) { 200 locationX = after - before; 201 } 202 203 float locationY = 0f; 204 if(top < bottom) { 205 locationY = bottom - top; 206 } 207 208 209 ImmPoint newLocation = new ImmPoint(oldLocation.getX() - locationX , 210 oldLocation.getY() - locationY); 211 212 res = new ImmRect(newLocation, new ImmSize(res.getWidth() + newWidth, res.getHeight() + newHeight)); 213 180 214 res = new ImmRect( 181 bound.getX() - DEFAULT_PADDING_L,182 bound.getY() - DEFAULT_PADDING_T,183 bound.getWidth() + DEFAULT_PADDING_R + DEFAULT_PADDING_L,184 bound.getHeight() + DEFAULT_PADDING_B + DEFAULT_PADDING_T);215 res.getX() - DEFAULT_PADDING_L, 216 res.getY() - DEFAULT_PADDING_T, 217 res.getWidth() + DEFAULT_PADDING_R + DEFAULT_PADDING_L, 218 res.getHeight() + DEFAULT_PADDING_B + DEFAULT_PADDING_T); 185 219 } else { 186 220 // can not determine... 187 221 // just make something... -
modules/org.sophie2.base.scene/src/main/java/org/sophie2/base/scene/helpers/SceneHelper.java
253 253 SophieLog.trace("sceneToSwing: viewRect=" + viewRect); 254 254 ImmRect res = Position.translate(sceneRect, -viewRect.getX(), -viewRect 255 255 .getY()); 256 257 res = res.translate(-visual.translationPoint().get().getX(), -visual.translationPoint().get().getY()); 256 258 SophieLog.trace("sceneToSwing: res= " + res); 257 259 return res; 258 260 … … 275 277 assert viewRect != null; 276 278 SophieLog.trace("sceneToSwing: viewRect=" + viewRect); 277 279 ImmPoint res = scenePoint.translate(-viewRect.getX(), -viewRect.getY()); 280 281 res = res.translate(-visual.translationPoint().get().getX(), -visual.translationPoint().get().getY()); 282 278 283 SophieLog.trace("sceneToSwing: res= " + res); 279 284 return res; 280 285 … … 292 297 public static ImmRect swingToScene(SceneVisual visual, ImmRect swingRect) { 293 298 // only translation... 294 299 ImmRect viewRect = visual.actualViewRect().get(); 295 return Position.translate(swingRect, viewRect.getX(), viewRect.getY()); 300 return Position.translate(swingRect, viewRect.getX(), viewRect.getY()) 301 .translate(visual.translationPoint().get().getX(), visual.translationPoint().get().getY()); 296 302 } 297 303 298 304 /** … … 308 314 // only translation... 309 315 ImmRect viewRect = visual.actualViewRect().get(); 310 316 assert viewRect != null; 311 return swingPoint.translate(viewRect.getX(), viewRect.getY()); 317 return swingPoint.translate(viewRect.getX(), viewRect.getY()) 318 .translate(visual.translationPoint().get().getX(), visual.translationPoint().get().getY()); 312 319 } 313 320 314 321 /** -
modules/org.sophie2.base.layout/src/main/java/org/sophie2/base/layout/model/CustomLayout.java
1 package org.sophie2.base.layout.model; 2 3 import java.awt.BorderLayout; 4 import java.awt.Component; 5 import java.awt.Container; 6 import java.awt.Dimension; 7 import java.awt.LayoutManager2; 8 9 import javax.swing.JDesktopPane; 10 import javax.swing.JLayeredPane; 11 12 /** 13 * LayoutManager that support adding of components with different layouts - null 14 * and some specific layout. An object is created with a specific 15 * {@link LayoutManager2}. When different components are added, they can be with 16 * constraint - CustomLayout.CUSTOM. This means that for layouting of these 17 * components will be used null layout. For all other components added, it will 18 * be used the given layout manager. This layout manager can be used for example 19 * for {@link JDesktopPane}. For example, components at 20 * {@link JLayeredPane#DEFAULT_LAYER} can be with {@link BorderLayout} and the 21 * components at {@link JLayeredPane#PALETTE_LAYER} to be with null layout. 22 * 23 * @author tanya 24 */ 25 public class CustomLayout implements LayoutManager2,java.io.Serializable { 26 27 /** 28 * Used for serialization. 29 */ 30 private static final long serialVersionUID = 810513263396699528L; 31 32 private LayoutManager2 layoutManager; 33 34 /** 35 * The constraint for the objects which we want to be with null layout. 36 */ 37 public static final String CUSTOM = "Custom"; 38 39 /** 40 * Constructs an object with another layout manager. The components added 41 * will be with null layout or will be added according 42 * 43 * @param manager 44 * The manager which will be responsible for how the components 45 * will be added and how will be layouted. 46 */ 47 public CustomLayout(LayoutManager2 manager) { 48 this.layoutManager = manager; 49 } 50 51 public void addLayoutComponent(Component comp, Object constraints) { 52 if (constraints != CUSTOM) { 53 this.layoutManager.addLayoutComponent(comp, constraints); 54 } 55 } 56 57 public float getLayoutAlignmentX(Container target) { 58 return this.layoutManager.getLayoutAlignmentX(target); 59 } 60 61 public float getLayoutAlignmentY(Container target) { 62 return this.layoutManager.getLayoutAlignmentY(target); 63 } 64 65 public void invalidateLayout(Container target) { 66 this.layoutManager.invalidateLayout(target); 67 } 68 69 public Dimension maximumLayoutSize(Container target) { 70 return this.layoutManager.maximumLayoutSize(target); 71 } 72 73 public void addLayoutComponent(String name, Component comp) { 74 this.layoutManager.addLayoutComponent(name, comp); 75 } 76 77 public void layoutContainer(Container parent) { 78 this.layoutManager.layoutContainer(parent); 79 } 80 81 public Dimension minimumLayoutSize(Container parent) { 82 return this.layoutManager.minimumLayoutSize(parent); 83 } 84 85 public Dimension preferredLayoutSize(Container parent) { 86 return this.layoutManager.preferredLayoutSize(parent); 87 } 88 89 public void removeLayoutComponent(Component comp) { 90 this.layoutManager.removeLayoutComponent(comp); 91 } 92 } 93 No newline at end of file -
modules/org.sophie2.main.app.commons/src/main/java/org/sophie2/main/app/commons/page/PageWorkArea.java
1 1 package org.sophie2.main.app.commons.page; 2 2 3 import java.awt.BorderLayout; 3 4 import java.util.ArrayList; 4 5 import java.util.List; 5 6 … … 10 11 import org.sophie2.base.commons.util.ImmColor; 11 12 import org.sophie2.base.commons.util.position.ImmArea; 12 13 import org.sophie2.base.commons.util.position.ImmMatrix; 14 import org.sophie2.base.commons.util.position.ImmPoint; 13 15 import org.sophie2.base.commons.util.position.ImmRect; 16 import org.sophie2.base.commons.util.position.ImmSize; 17 import org.sophie2.base.layout.model.CustomLayout; 14 18 import org.sophie2.base.model.book.PageH; 15 19 import org.sophie2.base.scene.SceneVisual; 16 20 import org.sophie2.base.scene.effects.ColorEffect; … … 157 161 @Override 158 162 protected void setupScene() { 159 163 rootElement().set(rootSceneElement().get()); 164 165 ImmPoint pageLocation = new ImmPoint(0, 0); 166 ImmSize pageSize = bookView().get().model().get().getPageSize(); 167 168 ImmRect centeringRect = new ImmRect(pageLocation, pageSize); 169 170 centeringRect().set(centeringRect); 160 171 topEventSource().set(PageWorkArea.this); 161 172 } 162 173 }; … … 208 219 @Override 209 220 protected void setup(JDesktopPane res) { 210 221 222 res.setLayout(new CustomLayout(new BorderLayout())); 223 211 224 JComponent sceneComp = sceneVisual().get().swingComponent().get(); 212 225 213 226 sceneComp.setLocation(0, 0); 214 227 SophieLog.debug("PageWorkArea.layeredPage: sceneComp:" + sceneComp); 215 228 216 229 res.removeAll(); 217 res.add(sceneComp, JLayeredPane.DEFAULT_LAYER); 230 res.setLayer(sceneComp, JLayeredPane.DEFAULT_LAYER); 231 232 res.add(sceneComp, BorderLayout.CENTER); 218 233 219 234 res.revalidate(); 220 235 res.repaint(); … … 226 241 protected void setupActualSize(JLayeredPane res) { 227 242 228 243 // grab the value to set up the property sync 229 ImmRect actualCache = sceneVisual().get().actualViewRect().get();244 // ImmRect actualCache = sceneVisual().get().actualViewRect().get(); 230 245 231 246 JDesktopPane desktopPane = swingComponent().get(); 232 247 desktopPane.revalidate(); … … 427 442 } 428 443 return getBean().makeProp(selectionRisenElement.class); 429 444 } 445 446 /** 447 * Property which have True or False value depending on whether mouse capture event is started or not. 448 * <b>true</b> if mouse capture is on, <b>false</b> otherwise. 449 * 450 * @return property 451 */ 452 public RwProp<Boolean> mouseCaptureOn() { 453 return getBean().makeValueProp("mouseCaptureOn", Boolean.class, Boolean.FALSE); 454 } 430 455 } 456 No newline at end of file -
modules/org.sophie2.main.app.halos/src/main/java/org/sophie2/main/app/halos/page/resize/PageResizeHaloButton.java
49 49 50 50 @Override 51 51 protected MouseCapture captureClick(MouseEvent e) { 52 PageWorkArea pwa = AppHaloUtil.getWorkArea(PageResizeHaloButton.this);52 final PageWorkArea pwa = AppHaloUtil.getWorkArea(PageResizeHaloButton.this); 53 53 54 54 if(pwa !=null ){ 55 55 … … 70 70 public void released() { 71 71 sv.wantedViewRect().set(null); 72 72 73 pwa.mouseCaptureOn().set(Boolean.TRUE); 73 74 74 75 new AutoAction("Set page size", true) { 75 76 … … 83 84 @Override 84 85 public void shouldMove(final int newX, final int newY) { 85 86 87 pwa.mouseCaptureOn().set(Boolean.TRUE); 88 86 89 if (newX <= 0 || newY <= 0) { 87 90 return; 88 91 } -
modules/org.sophie2.main.app.commons/src/main/java/org/sophie2/main/app/commons/page/ScenePageLogic.java
134 134 @Override 135 135 public void released() { 136 136 pwa.selectionArea().set(ImmArea.EMPTY); 137 138 pwa.mouseCaptureOn().set(Boolean.FALSE); 137 139 } 138 140 139 141 @Override 140 142 public void shouldMove(int newX, int newY) { 143 144 pwa.mouseCaptureOn().set(Boolean.TRUE); 145 141 146 ImmPoint endPoint = transf.transform(new ImmPoint(newX, newY)); 142 147 143 148 float x = Math.min(startPoint.getX(), endPoint.getX()); -
modules/org.sophie2.main.app.commons/src/main/java/org/sophie2/main/app/commons/app/AppMainWindow.java
15 15 import org.sophie2.base.halos.HaloMenu; 16 16 import org.sophie2.base.halos.HudDialog; 17 17 import org.sophie2.base.layout.impl.DefaultMainWindow; 18 import org.sophie2.base.layout.model.CustomLayout; 18 19 import org.sophie2.base.layout.model.DocView; 19 20 import org.sophie2.base.media.MediaComposite; 20 21 import org.sophie2.base.media.MediaUtil; … … 212 213 if (hm.visible().get()) { 213 214 for (JComponent c : hm.swingComponents().get()) { 214 215 215 res.add(c, JLayeredPane.PALETTE_LAYER); 216 res.setLayer(c, JLayeredPane.PALETTE_LAYER); 217 res.add(c, CustomLayout.CUSTOM); 218 216 219 } 217 220 } 218 221 } … … 236 239 } 237 240 PageWorkArea workArea = bookDocView.workArea().get(); 238 241 239 JDesktopPane res = workArea.swingComponent().get(); 240 241 // The scene bounds 242 ImmRect bounds = workArea.sceneVisual().get().actualViewRect().get(); 243 // The bounds of visible huds 244 for (HaloMenu hm : haloMenus().get()) { 245 246 if (hm.visible().get()) { 247 248 bounds = bounds.union(SceneHelper.swingToScene( 249 workArea.sceneVisual().get(), hm.bounds().get())); 250 251 for (HudDialog hud = hm.activeHud().get(); 252 hud!=null && hud.visible().get(); hud = hud.subHud().get()) { 253 254 ImmRect hudBounds = new ImmRect(hud.location().get(), hud.size().get()); 255 242 if (!workArea.mouseCaptureOn().get()) { 243 244 JDesktopPane res = workArea.swingComponent().get(); 245 246 // The scene bounds 247 ImmRect bounds = workArea.sceneVisual().get().actualViewRect().get(); 248 // The bounds of visible huds 249 for (HaloMenu hm : haloMenus().get()) { 250 251 if (hm.visible().get()) { 252 256 253 bounds = bounds.union(SceneHelper.swingToScene( 257 workArea.sceneVisual().get(), hudBounds)); 254 workArea.sceneVisual().get(), hm.bounds().get())); 255 256 for (HudDialog hud = hm.activeHud().get(); 257 hud!=null && hud.visible().get(); hud = hud.subHud().get()) { 258 259 ImmRect hudBounds = new ImmRect(hud.location().get(), hud.size().get()); 260 261 bounds = bounds.union(SceneHelper.swingToScene( 262 workArea.sceneVisual().get(), hudBounds)); 263 } 258 264 } 259 265 } 260 }261 266 262 bounds = SceneHelper.sceneToSwing(workArea.sceneVisual().get(), bounds);263 Dimension d = bounds.getSize().toDimension();267 bounds = SceneHelper.sceneToSwing(workArea.sceneVisual().get(), bounds); 268 Dimension d = bounds.getSize().toDimension(); 264 269 265 res.setPreferredSize(d); 266 res.setSize(d); 267 res.revalidate(); 270 res.setPreferredSize(d); 271 res.setSize(d); 272 res.revalidate(); 273 } 268 274 } 269 275 270 276 } -
modules/org.sophie2.base.scene/src/main/java/org/sophie2/base/scene/impl/BaseScene.java
1 1 package org.sophie2.base.scene.impl; 2 2 3 3 import org.sophie2.base.commons.util.ImmColor; 4 import org.sophie2.base.commons.util.position.ImmRect; 4 5 import org.sophie2.base.scene.interfaces.Scene; 5 6 import org.sophie2.base.scene.interfaces.SceneElement; 6 7 import org.sophie2.core.prolib.impl.ResourceProperty; … … 20 21 } 21 22 22 23 @Override 24 public RwProp<ImmRect> centeringRect() { 25 return getBean().makeValueProp("centeringRect", ImmRect.class, ImmRect.ZERO_RECT); 26 } 27 28 @Override 23 29 public RwProp<ImmColor> backgroundColor() { 24 30 return getBean().makeValueProp("backgroundColor", ImmColor.class, 25 31 ImmColor.GRAY); -
modules/org.sophie2.main.app.commons/src/main/java/org/sophie2/main/app/commons/frame/FrameLogic.java
55 55 final ElementView elementView = event.getSource(ElementView.class); 56 56 final ResourceAccess access = elementView.getAccess(); 57 57 58 PageWorkArea pwa = elementView.getPwa();58 final PageWorkArea pwa = elementView.getPwa(); 59 59 Mode sizeTemplateMode = ResizableElement.KEY_SIZE.getMode(access); 60 60 Mode locTemplateMode = MemberElement.KEY_LOCATION.getMode(access); 61 61 … … 102 102 @Override 103 103 public void released() { 104 104 doResize(channel); 105 pwa.mouseCaptureOn().set(Boolean.TRUE); 105 106 sv.wantedViewRect().set(null); 106 107 } 107 108 … … 124 125 @Override 125 126 public void shouldMove(int newX, int newY) { 126 127 128 pwa.mouseCaptureOn().set(Boolean.TRUE); 129 127 130 ImmVector v0InFr = frameToScene.inverseTransform(new ImmVector(0, 0)); 128 131 ImmVector v = new ImmVector(newX, newY); 129 132 ImmVector vInFrame = frameToScene.inverseTransform(v); -
modules/org.sophie2.main.scene.simple/src/main/java/org/sophie2/main/scene/simple/SimpleSceneVisual.java
6 6 import javax.swing.JComponent; 7 7 import javax.swing.JPanel; 8 8 9 import org.sophie2.base.commons.util.position.ImmPoint; 9 10 import org.sophie2.base.commons.util.position.ImmRect; 11 import org.sophie2.base.commons.util.position.ImmSize; 10 12 import org.sophie2.base.scene.BaseSceneVisual; 11 13 import org.sophie2.base.scene.SceneVisual; 12 14 import org.sophie2.base.scene.helpers.SceneHelper; … … 55 57 Graphics2D g2d = (Graphics2D) graphics.create(); 56 58 ImmRect visRect = actualViewRect().get(); 57 59 58 SceneHelper.paint(g2d, visRect, scene().get()); 60 //Centering the actual view rectangle. 61 int w = this.getWidth(); 62 int h = this.getHeight(); 63 64 float tx = (w - visRect.getWidth())/2; 65 float ty = (h - visRect.getHeight())/2; 66 67 68 ImmPoint point = new ImmPoint(-tx, -ty); 69 translationPoint().set(point); 70 71 ImmPoint oldLocation = visRect.getLocation(); 72 ImmPoint newLocation = new ImmPoint(oldLocation.getX() - tx , oldLocation.getY() - ty); 59 73 74 visRect = new ImmRect(newLocation, new ImmSize(w, h)); 75 76 SceneHelper.paint(g2d, visRect, scene().get()); 77 60 78 SophieLog.debug("paintComponent: total paint time=" 61 79 + (System.currentTimeMillis() - startTime)); 62 80 } -
modules/org.sophie2.dev/src/main/java/org/sophie2/dev/author/FakeAuthorMain.java
107 107 //SophieLog.setMinLevel("org.sophie2.main.func.timelines", LogLevel.DEBUG); 108 108 //SophieLog.setMinLevel("org.sophie2.main.func.media.view", LogLevel.ALL); 109 109 //SophieLog.setMinLevel("org.sophie2.base.bound", LogLevel.ALL); 110 SophieLog.setMinLevel("org.sophie2.main.scene.simple", LogLevel. NONE);110 SophieLog.setMinLevel("org.sophie2.main.scene.simple", LogLevel.WARN); 111 111 SophieLog.setMinLevel("org.sophie2.main.func.media.logic", LogLevel.DEBUG); 112 112 113 113 assert System.getProperty(SophieEditions.PROP_ID) == null : -
modules/org.sophie2.base.scene/src/main/java/org/sophie2/base/scene/SceneVisual.java
2 2 3 3 import javax.swing.JComponent; 4 4 5 import org.sophie2.base.commons.util.position.ImmPoint; 5 6 import org.sophie2.base.commons.util.position.ImmRect; 6 7 import org.sophie2.base.scene.interfaces.Scene; 7 8 import org.sophie2.base.visual.VisualElement; … … 73 74 * @return property 74 75 */ 75 76 Prop<ImmRect> actualViewRect(); 77 78 /** 79 * Returns with what distance by x-coordinate and y-coordinate should visual 80 * component be translated. Used with halos when the actual view rectangle is centered. 81 * 82 * @return property 83 */ 84 public RwProp<ImmPoint> translationPoint(); 76 85 } -
modules/org.sophie2.main.app.halos/src/main/java/org/sophie2/main/app/halos/frame/MainTitleBarHalo.java
344 344 public void released() { 345 345 sv.wantedViewRect().set(null); 346 346 releasedAction(finalOldLocations, finalFrameRefs, finalTimes); 347 workArea().get().mouseCaptureOn().set(Boolean.FALSE); 347 348 } 348 349 349 350 @Override 350 351 public void shouldMove(final int newX, final int newY) { 352 workArea().get().mouseCaptureOn().set(Boolean.TRUE); 351 353 moveAction(finalOldLocations, finalFrameRefs, finalTimes, newX, newY); 352 354 353 355 }