Ticket #2494: videoPerformance_first.patch
File videoPerformance_first.patch, 28.3 KB (added by boyanl, 15 years ago) |
---|
-
modules/org.sophie2.main.app.layout/src/main/java/org/sophie2/main/app/layout/left/pages/PageStructurePalette.java
### Eclipse Workspace Patch 1.0 #P sophie
10 10 import org.sophie2.base.commons.util.ImmList; 11 11 import org.sophie2.base.commons.util.position.ImmPoint; 12 12 import org.sophie2.base.commons.util.position.ImmSize; 13 import org.sophie2.base.commons.util.position.Position;14 13 import org.sophie2.base.dnd.SophieDragDropHandler; 15 14 import org.sophie2.base.layout.model.TreePalette; 16 15 import org.sophie2.base.layout.model.TreePaletteItem; 17 16 import org.sophie2.base.model.book.ElementH; 18 import org.sophie2.base.model.book.frame.BoundMode;19 17 import org.sophie2.base.model.book.interfaces.ResizableElement; 20 18 import org.sophie2.base.model.book.links.Link; 21 19 import org.sophie2.base.model.book.links.LinkRule; … … 255 253 } 256 254 257 255 if (type().get() == ItemType.DETAILS_LOCATION) { 258 ImmPoint pos = model.getLocation(BoundMode.CONTENT, 259 Position.TOP_LEFT, element().get().getTime()); 256 ImmPoint pos = element().get().contentLocation().get(); 260 257 261 258 return "Frame Location : " + "( " + pos.getX() + 262 259 ", " + pos.getY() + " )"; -
modules/org.sophie2.main.app.halos/src/main/java/org/sophie2/main/app/halos/frame/rotate/FrameRotateHaloMenu.java
41 41 if (!computeVisible()) { 42 42 return ImmPoint.ZERO; 43 43 } 44 ImmPoint frameLocation = frameView.contentLocation().get(); 45 44 46 FrameH frame = frameView.model().get(); 45 ImmPoint frameLocation = frame.getLocation(BoundMode.CONTENT, Position.TOP_LEFT, 46 frameView.getTime()); 47 ImmPoint locInParent = frame.getLocation(BoundMode.MARGIN, Position.BOTTOM_RIGHT, 48 frameView.getTime()); 47 ImmPoint locInParent = frame.getLocation(frameView.contentLocation().get(), 48 BoundMode.MARGIN, Position.BOTTOM_RIGHT); 49 49 ImmPoint locInFrame = 50 50 locInParent.translate(-frameLocation.getX(), -frameLocation.getY()); 51 51 return locInFrame; -
modules/org.sophie2.base.model.book/src/main/java/org/sophie2/base/model/book/ElementH.java
5 5 6 6 import org.sophie2.base.commons.structures.ImmTreeList; 7 7 import org.sophie2.base.commons.util.ImmList; 8 import org.sophie2.base.commons.util.position.ImmArea;9 8 import org.sophie2.base.commons.util.position.ImmInsets; 10 import org.sophie2.base.commons.util.position.ImmMatrix;11 9 import org.sophie2.base.commons.util.position.ImmPoint; 12 10 import org.sophie2.base.commons.util.position.ImmRect; 13 import org.sophie2.base.commons.util.position.ImmSize;14 11 import org.sophie2.base.commons.util.position.Position; 15 12 import org.sophie2.base.media.TimePos; 16 13 import org.sophie2.base.model.book.actions.RemoveSubElementAction; 17 14 import org.sophie2.base.model.book.frame.BoundMode; 18 15 import org.sophie2.base.model.book.frame.FrameR4; 19 import org.sophie2.base.model.book.frame.WrappingModes;20 16 import org.sophie2.base.model.book.interfaces.CompositeElement; 21 17 import org.sophie2.base.model.book.interfaces.MemberElement; 22 18 import org.sophie2.base.model.book.interfaces.StyledElement; … … 68 64 public static final int Y_OFFSET = 50; 69 65 70 66 /** 71 * Calculates the bound area of this element in the selected72 * {@link BoundMode} for the selected {@link TimePos}. For a simple element,73 * like {@link FrameR4}, will return the area of the element itself. For a74 * composite element, returns the union of all the sub-elements, considering75 * rotation angles.76 *77 * @param boundMode78 * The mode for calculating the area.79 * @param elementTime80 * The current moment for which to calculate the area. Needed,81 * since the location is time-dependent.82 * @param wrapMode83 * Whether or not the area is important. Used for calculating the84 * area for the different wrapping modes of frames. When the text should85 * not go around the frame, the area of the frame is not86 * important.When wrapMode is <b>false</b>, it will be checked87 * whether or not the wrap mode of the frame is88 * {@link WrappingModes#NO_WRAP}, and if so, the area will be89 * empty. The default value is <b>true</b>.90 * @return91 * The calculated {@link ImmArea}.92 */93 public ImmArea getBoundArea(BoundMode boundMode,94 TimePos elementTime, Boolean wrapMode) {95 96 if (!elementTime.isOn()) {97 return ImmArea.EMPTY;98 }99 100 ImmPoint contentLocation = getLocation(BoundMode.CONTENT,101 Position.TOP_LEFT, elementTime);102 103 if (ElementUtils.isContainer(this)) {104 ImmArea area = ImmArea.EMPTY;105 for (ElementH element : getChildElements(elementTime)) {106 107 // TODO (r4) consider relative locations.. --kyli108 area = area.union(element.getBoundArea(boundMode, getSubTime(109 getChildRef(element), elementTime), wrapMode));110 }111 return area.transform(ImmMatrix.IDENTITY.rotate(getRotationAngle(),112 contentLocation.getX(), contentLocation.getY()));113 }114 115 ImmPoint position = getLocation(boundMode, Position.TOP_LEFT,116 elementTime);117 ImmSize size = boundMode.getSize(getWrapSize(), getPaddingInsets(),118 getStyleHelper().getBorderInsets(), getMarginInsets());119 ImmArea res = new ImmArea(new ImmRect(position, size)).transform(120 ImmMatrix.IDENTITY.rotate(getRotationAngle(),121 contentLocation.getX(), contentLocation.getY()));122 return res;123 }124 125 /**126 67 * Retrieves the currently active children of this element. This means that 127 68 * they should have {@link ActivationChannel}s with appropriate values. 128 69 * Useful for views. … … 304 245 } 305 246 306 247 /** 248 * Gets the location of a specific frame position, given a content location and a mode. 249 * Used for optimization since it re-uses the calculated content location which is 250 * time-dependent. 251 * (The content location is the location of the point TOP_LEFT in bound mode CONTENT in a specified time) 252 * 253 * @param contentLocation 254 * - The provided content location for the element. 255 * @param mode 256 * - {@link BoundMode} in which the point will be calculated 257 * @param pos 258 * - {@link Position} of the point in the rectangle 259 * @return The location of the interesting point (pos) of the mode`s 260 * rectangle. 261 */ 262 public ImmPoint getLocation(ImmPoint contentLocation, BoundMode mode, 263 Position pos) { 264 ImmRect bounds = new ImmRect(contentLocation, getWrapSize()); 265 266 ImmPoint point = pos.getPoint(mode.getRect( 267 bounds, getPaddingInsets(), 268 getStyleHelper().getBorderInsets(), getMarginInsets())); 269 return point; 270 } 271 272 /** 307 273 * Gets the location of a specific frame position in specific mode. 308 274 * 309 275 * @param mode … … 320 286 LocationChannel channel = get(MemberElement.KEY_LOCATION); 321 287 ImmPoint contentLocation = channel.getValue(localTime); 322 288 323 ImmRect bounds = new ImmRect(contentLocation, getWrapSize()); 324 325 ImmPoint point = pos.getPoint(mode.getRect(bounds, getPaddingInsets(), 326 getStyleHelper().getBorderInsets(), getMarginInsets())); 327 return point; 289 return getLocation(contentLocation, mode, pos); 328 290 } 329 291 330 292 /** -
modules/org.sophie2.main.app.commons/src/main/java/org/sophie2/main/app/commons/element/ElementView.java
10 10 import org.sophie2.base.commons.util.ImmList; 11 11 import org.sophie2.base.commons.util.NaiveImmList; 12 12 import org.sophie2.base.commons.util.position.ImmArea; 13 import org.sophie2.base.commons.util.position.ImmMatrix; 14 import org.sophie2.base.commons.util.position.ImmPoint; 15 import org.sophie2.base.commons.util.position.ImmRect; 16 import org.sophie2.base.commons.util.position.ImmSize; 17 import org.sophie2.base.commons.util.position.Position; 13 18 import org.sophie2.base.media.AudioChunk; 14 19 import org.sophie2.base.media.MediaComposite; 15 20 import org.sophie2.base.media.TimePos; 16 21 import org.sophie2.base.model.book.ElementH; 22 import org.sophie2.base.model.book.ElementH.ElementUtils; 23 import org.sophie2.base.model.book.frame.BoundMode; 24 import org.sophie2.base.model.book.frame.FrameR4; 25 import org.sophie2.base.model.book.frame.WrappingModes; 17 26 import org.sophie2.base.model.book.interfaces.CompositeElement; 27 import org.sophie2.base.model.book.interfaces.MemberElement; 18 28 import org.sophie2.base.model.book.links.Link; 19 29 import org.sophie2.base.model.book.links.LinkTrigger; 20 30 import org.sophie2.base.model.book.resource.r4.ElementR4; 21 31 import org.sophie2.base.model.book.timelines.ActivationChannel; 32 import org.sophie2.base.model.book.timelines.LocationChannel; 22 33 import org.sophie2.base.model.resources.r4.ResourceRefR4; 23 34 import org.sophie2.base.model.resources.r4.access.ResourceAccess; 24 35 import org.sophie2.base.model.resources.r4.model.ResourceModel; … … 123 134 @Override 124 135 protected SceneElement compute() { 125 136 SceneElement res = new DefaultCompositeSceneElement() { 126 @SuppressWarnings("synthetic-access")127 137 @Override 128 138 protected void setupElements() { 129 139 List<SceneElement> subs = subElements().get(); … … 352 362 public BaseBookView getBookView() { 353 363 return findParentElement(BaseBookView.class); 354 364 } 365 366 /** 367 * Prop used to reduce the time dependency. Used only for optimization purposes. 368 * 369 * @return 370 * The location for the current moment in time. 371 */ 372 public Prop<ImmPoint> contentLocation() { 373 class contentLocation extends AutoProperty<ImmPoint> { 355 374 375 @Override 376 protected ImmPoint compute() { 377 return model().get().getLocation(BoundMode.CONTENT, 378 Position.TOP_LEFT, getTime()); 379 } 380 } 381 return getBean().makeProp(contentLocation.class); 382 } 383 356 384 /** 385 * Prop used to reduce the time dependency. Used only for optimization purposes. 386 * 387 * @return 388 * The location for the margins area in this time. 389 */ 390 public Prop<ImmPoint> marginLocation() { 391 class marginLocation extends AutoProperty<ImmPoint> { 392 393 @Override 394 protected ImmPoint compute() { 395 return model().get().getLocation(contentLocation().get(), BoundMode.MARGIN, 396 Position.TOP_LEFT); 397 } 398 } 399 return getBean().makeProp(marginLocation.class); 400 } 401 402 /** 403 * Prop used to reduce the time setting time. Used for optimization. 404 * 405 * @return 406 * The current location channel. 407 */ 408 public Prop<LocationChannel> locationChannel() { 409 class locationChannel extends AutoProperty<LocationChannel> { 410 411 @Override 412 protected LocationChannel compute() { 413 return model().get().get(MemberElement.KEY_LOCATION); 414 } 415 } 416 return getBean().makeProp(locationChannel.class); 417 } 418 419 /** 357 420 * Adds all scene elements that should be displayed as children of this view's model scene 358 421 * element. 359 422 * … … 405 468 */ 406 469 public static final ImmColor INVISIBLE_COLOR = new ImmColor(0.8f, 0.8f, 1.0f, 0.8f); 407 470 408 private Prop<Boolean> isOn() { 471 /** 472 * Property used to determine whether the time phase is on. 473 * 474 * @return 475 * true if the time phase is on, false otherwise. 476 */ 477 public Prop<Boolean> isOn() { 409 478 class isOn extends AutoProperty<Boolean> { 410 479 @Override 411 480 protected Boolean compute() { … … 766 835 */ 767 836 public static final int RESOURCE_REF_PARAM_INDEX = 0; 768 837 } 838 839 /** 840 * Calculates the bound area of this element in the selected 841 * {@link BoundMode} for the selected {@link TimePos}. For a simple element, 842 * like {@link FrameR4}, will return the area of the element itself. For a 843 * composite element, returns the union of all the sub-elements, considering 844 * rotation angles. 845 * 846 * @param boundMode 847 * The mode for calculating the area. 848 * @param wrapMode 849 * Whether or not the area is important. Used for calculating the 850 * area for the different wrapping modes of frames. When the text should 851 * not go around the frame, the area of the frame is not 852 * important.When wrapMode is <b>false</b>, it will be checked 853 * whether or not the wrap mode of the frame is 854 * {@link WrappingModes#NO_WRAP}, and if so, the area will be 855 * empty. The default value is <b>true</b>. 856 * @return 857 * The calculated {@link ImmArea}. 858 */ 859 public ImmArea getBoundArea(BoundMode boundMode, Boolean wrapMode) { 860 861 ElementH model = model().get(); 862 if (!isOn().get()) { 863 return ImmArea.EMPTY; 864 } 769 865 866 ImmPoint contentLocation = contentLocation().get(); 867 868 if (ElementUtils.isContainer(this.model().get())) { 869 ImmArea area = ImmArea.EMPTY; 870 for (ElementView element : elementViews().get()) { 871 if (element.isOn().get()) { 872 ImmArea innerArea = element.getBoundArea(boundMode, wrapMode); 873 874 area = area.union(innerArea); 875 } 876 } 877 return area.transform(ImmMatrix.IDENTITY.rotate(model.getRotationAngle(), 878 contentLocation.getX(), contentLocation.getY())); 879 } 880 ImmPoint position; 881 if (BoundMode.CONTENT.equals(boundMode)) { 882 position = contentLocation; 883 } else if (BoundMode.MARGIN.equals(boundMode)){ 884 position = marginLocation().get(); 885 } else { 886 TimePos elementTime = getTime(); 887 position = model.getLocation(boundMode, Position.TOP_LEFT, 888 elementTime); 889 } 890 891 ImmSize size = boundMode.getSize(model.getWrapSize(), model.getPaddingInsets(), 892 model.getStyleHelper().getBorderInsets(), model.getMarginInsets()); 893 ImmArea res = new ImmArea(new ImmRect(position, size)).transform( 894 ImmMatrix.IDENTITY.rotate(model.getRotationAngle(), 895 contentLocation.getX(), contentLocation.getY())); 896 return res; 897 } 898 770 899 } 900 No newline at end of file -
modules/org.sophie2.main.app.commons/src/main/java/org/sophie2/main/app/commons/frame/FrameView.java
26 26 import org.sophie2.base.model.book.actions.base.SetKeyAction; 27 27 import org.sophie2.base.model.book.frame.BoundMode; 28 28 import org.sophie2.base.model.book.frame.FrameR4; 29 import org.sophie2.base.model.book. interfaces.MemberElement;29 import org.sophie2.base.model.book.frame.WrappingModes; 30 30 import org.sophie2.base.model.book.interfaces.ResourceFrame; 31 31 import org.sophie2.base.model.book.interfaces.StyledElement; 32 32 import org.sophie2.base.model.book.links.LinkTrigger; 33 import org.sophie2.base.model.book.timelines.LocationChannel;34 33 import org.sophie2.base.model.resources.r4.ResourceRefR4; 35 34 import org.sophie2.base.model.resources.r4.access.ResourceAccess; 36 35 import org.sophie2.base.model.resources.r4.changes.AutoAction; … … 483 482 484 483 return getBean().makeProp(localRectCache.class); 485 484 } 486 487 488 /**489 * Prop used to reduce the time dependency. Used only for optimization purposes.490 *491 * @return492 * The content location for the current moment in time.493 */494 private Prop<ImmPoint> contentLocation() {495 class contentLocation extends AutoProperty<ImmPoint> {496 485 497 @Override498 protected ImmPoint compute() {499 LocationChannel channel = model().get().get(MemberElement.KEY_LOCATION);500 501 return channel.getValue(getTime());502 }503 }504 return getBean().makeProp(contentLocation.class);505 }506 507 486 /** 508 487 * Gets the top-left location for the current moment in time. 509 488 * @param mode … … 693 672 694 673 return getBean().makeProp(templateKind.class); 695 674 } 675 676 677 @Override 678 public ImmArea getBoundArea(BoundMode boundMode, Boolean wrapMode) { 679 if (!wrapMode) { 680 if (WrappingModes.NO_WRAP.equals(model().get().get(FrameR4.KEY_WRAP))) { 681 return ImmArea.EMPTY; 682 } 683 } 684 return super.getBoundArea(boundMode, wrapMode); 685 } 686 696 687 } -
modules/org.sophie2.main.app.commons/src/main/java/org/sophie2/main/app/commons/page/ScenePageLogic.java
151 151 List<ElementView> toSelect = new ArrayList<ElementView>(); 152 152 153 153 for (ElementView view : elementViews) { 154 ImmRect bounds = view. model().get().getBoundArea(BoundMode.OUT_BORDER,155 view.getTime(),true).getBounds();154 ImmRect bounds = view.getBoundArea(BoundMode.OUT_BORDER, 155 true).getBounds(); 156 156 if (selRect.contains(bounds)) 157 157 if (pwa.getSel().canBeSelected(view)) { 158 158 toSelect.add(view); -
modules/org.sophie2.main.app.halos/src/test/java/org/sophie2/main/app/halos/frame/rotate/FrameRotateHaloButtonTest.java
116 116 @Test 117 117 public void test90() { 118 118 119 ImmArea area = this.f rame.getBoundArea(BoundMode.MARGIN, this.fv.getTime(), true);119 ImmArea area = this.fv.getBoundArea(BoundMode.MARGIN, true); 120 120 int marginHeight = (int) area.getBounds().getHeight(); 121 121 122 122 rotate(0, -marginHeight, -Math.PI/2, null); … … 128 128 @Test 129 129 public void test45() { 130 130 131 ImmArea area = this.f rame.getBoundArea(BoundMode.MARGIN, this.fv.getTime(), true);131 ImmArea area = this.fv.getBoundArea(BoundMode.MARGIN, true); 132 132 int marginHeight = (int) area.getBounds().getHeight(); 133 133 134 134 rotate(0, -marginHeight/2, -Math.PI/4, null); … … 142 142 BaseBookView bookView = this.pwa.bookView().get(); 143 143 bookView.setViewOptions(bookView.getViewOptions().modifyZoom(0.5f)); 144 144 145 ImmArea area = this.f rame.getBoundArea(BoundMode.MARGIN, this.fv.getTime(), true);145 ImmArea area = this.fv.getBoundArea(BoundMode.MARGIN, true); 146 146 147 147 int marginHeight = (int) area.getBounds().getHeight(); 148 148 rotate(0, -marginHeight/4, -Math.PI/4, null); … … 156 156 BaseBookView bookView = this.pwa.bookView().get(); 157 157 bookView.setViewOptions(bookView.getViewOptions().modifyZoom(2.0f)); 158 158 159 ImmArea area = this.f rame.getBoundArea(BoundMode.MARGIN, this.fv.getTime(), true);159 ImmArea area = this.fv.getBoundArea(BoundMode.MARGIN, true); 160 160 int marginHeight = (int) area.getBounds().getHeight(); 161 161 162 162 rotate(0, -marginHeight, -Math.PI/4, null); -
modules/org.sophie2.extra.func.annotations/src/main/java/org/sophie2/extra/func/annotations/view/AudioAnnotationView.java
65 65 66 66 @Override 67 67 protected ImmRect compute() { 68 return model().get().getBoundArea( 69 BoundMode.CONTENT, getTime(), true).getBounds(); 68 return getBoundArea(BoundMode.CONTENT, true).getBounds(); 70 69 } 71 70 } 72 71 return getBean().makeProp(bounds.class); -
modules/org.sophie2.main.app.commons/src/main/java/org/sophie2/main/app/commons/page/PwaSelector.java
340 340 * True if the specified ElementView can be selected; false otherwise. 341 341 */ 342 342 public boolean canBeSelected(ElementView toSelect) { 343 if (!toSelect. getTime().isOn()) {343 if (!toSelect.isOn().get()) { 344 344 return false; 345 345 } 346 346 -
modules/org.sophie2.main.func.text/src/main/java/org/sophie2/main/func/text/view/TextFrameView.java
3 3 import java.util.List; 4 4 5 5 import org.sophie2.base.commons.util.position.ImmArea; 6 import org.sophie2.base.media.TimePos;7 6 import org.sophie2.base.model.book.frame.BoundMode; 8 7 import org.sophie2.base.model.resources.r4.access.ResourceAccess; 9 8 import org.sophie2.base.model.text.model.ImmTextInterval; … … 55 54 */ 56 55 public Prop<ImmArea> wrappedArea() { 57 56 class wrappedArea extends AutoProperty<ImmArea> { 58 57 59 58 @Override 60 59 protected ImmArea compute() { 61 TimePos time = getTime(); 62 ImmArea resArea = model().get().getBoundArea(BoundMode.CONTENT, time, true); 60 ImmArea resArea = getBoundArea(BoundMode.CONTENT, true); 63 61 ElementView parentView = parent().get(); 64 62 65 63 if (parentView != null) { … … 73 71 break; 74 72 } 75 73 resArea = resArea.subtract( 76 nextView. model().get().getBoundArea(BoundMode.MARGIN, time, false));74 nextView.getBoundArea(BoundMode.MARGIN, false)); 77 75 } 78 76 } 77 return resArea; 79 78 } 80 return resArea;79 return ImmArea.EMPTY; 81 80 } 82 81 } 83 82 return getBean().makeProp(wrappedArea.class); -
modules/org.sophie2.base.model.book/src/main/java/org/sophie2/base/model/book/FrameH.java
1 1 package org.sophie2.base.model.book; 2 2 3 3 import org.sophie2.base.commons.util.ImmList; 4 import org.sophie2.base.commons.util.position.ImmArea;5 4 import org.sophie2.base.commons.util.position.ImmInsets; 6 5 import org.sophie2.base.commons.util.position.ImmPoint; 7 6 import org.sophie2.base.commons.util.position.ImmSize; 8 7 import org.sophie2.base.media.TimePos; 9 8 import org.sophie2.base.model.book.frame.BoundMode; 10 import org.sophie2.base.model.book.frame.FrameR4;11 import org.sophie2.base.model.book.frame.WrappingModes;12 9 import org.sophie2.base.model.book.interfaces.CompositeElement; 13 10 import org.sophie2.base.model.book.interfaces.MemberElement; 14 11 import org.sophie2.base.model.book.interfaces.ResizableElement; … … 196 193 return ".frame.s2"; 197 194 } 198 195 199 @Override200 public ImmArea getBoundArea(BoundMode boundMode, TimePos elementTime,201 Boolean wrapMode) {202 if (!wrapMode) {203 if (WrappingModes.NO_WRAP.equals(this.get(FrameR4.KEY_WRAP))) {204 return ImmArea.EMPTY;205 }206 }207 return super.getBoundArea(boundMode, elementTime, wrapMode);208 }209 210 196 } -
modules/org.sophie2.main.app.halos/src/main/java/org/sophie2/main/app/halos/align/AlignElementsLogic.java
49 49 50 50 ImmArea bounds = ImmArea.EMPTY; 51 51 for (ElementView view : selected) { 52 ImmArea area = view. model().get().getBoundArea(BoundMode.CONTENT, view.getTime(), true);52 ImmArea area = view.getBoundArea(BoundMode.CONTENT, true); 53 53 bounds = bounds.union(area); 54 54 } 55 55 … … 66 66 for (int i = 0; i < selected.size(); ++i) { 67 67 if (selected.get(i).model().get().isMember()) { 68 68 ElementView selectedView = selected.get(i); 69 ImmRect oldBounds = selectedView. model().get().getBoundArea(70 BoundMode.CONTENT, selectedView.getTime(),true).getBounds();69 ImmRect oldBounds = selectedView.getBoundArea( 70 BoundMode.CONTENT, true).getBounds(); 71 71 ImmPoint newLocation = button.calculateNewLocation(oldBounds, alignValue); 72 72 oldLocations.add(selectedView.model().get().get(MemberElement.KEY_LOCATION)); 73 73 newLocations.add(newLocation); -
modules/org.sophie2.base.commons/src/main/java/org/sophie2/base/commons/util/position/ImmArea.java
90 90 }); 91 91 } 92 92 93 @Override 94 public String toString() { 95 return "ImmArea: " + this.area.getBounds().height + " " + this.area.getBounds().width; 96 } 93 97 /** 94 98 * Computes the union of this area and another one. 95 99 * … … 279 283 return h.toHash(); 280 284 } 281 285 } 286 287 @Override 288 public int hashCode() { 289 final int prime = 31; 290 int result = 1; 291 result = prime * result + ((this.area == null) ? 0 : this.area.hashCode()); 292 return result; 293 } 294 295 @Override 296 public boolean equals(Object obj) { 297 if (this == obj) { 298 return true; 299 } 300 if (obj == null) { 301 return false; 302 } 303 if (getClass() != obj.getClass()) { 304 return false; 305 } 306 ImmArea other = (ImmArea) obj; 307 if (this.area == null) { 308 if (other.area != null) { 309 return false; 310 } 311 } else if (!this.area.equals(other.area)) { 312 return false; 313 } 314 315 return true; 316 } 282 317 } -
modules/org.sophie2.main.func.text/src/main/java/org/sophie2/main/func/text/view/HotTextLogic.java
124 124 125 125 Boolean forceSignificance = event.getEventParam( 126 126 TextView.EventIds.FORCE_SIGNIFICANCE_PARAM_INDEX, Boolean.class); 127 127 128 128 final Message description = event.getEventParam( 129 129 TextView.EventIds.DESCRIPTION_PARAM_INDEX, Message.class); 130 130 -
modules/org.sophie2.main.app.halos/src/main/java/org/sophie2/main/app/halos/huds/properties/PropertiesHud.java
561 561 res = model.getLocation(BoundMode.CONTENT, 562 562 rotationPosition().get(), time); 563 563 564 ImmPoint contentLoc = model.getLocation( 565 BoundMode.CONTENT, Position.TOP_LEFT, time); 564 ImmPoint contentLoc = fv.contentLocation().get(); 566 565 ImmMatrix m = ImmMatrix.IDENTITY.rotate 567 566 (model.getRotationAngle(), contentLoc.getX(), contentLoc.getY()); 568 567 res = m.transform(res);