Ticket #2436: 2436-frame-template-editing-de.patch
File 2436-frame-template-editing-de.patch, 51.5 KB (added by deni, 15 years ago) |
---|
-
modules/org.sophie2.main.app.menus/src/main/java/org/sophie2/main/app/menus/file/SaveBookItem.java
### Eclipse Workspace Patch 1.0 #P sophie
9 9 import org.sophie2.base.skins.SkinElementId; 10 10 import org.sophie2.base.visual.skins.ElementPartCreator; 11 11 import org.sophie2.base.visual.skins.SkinPartDef; 12 import org.sophie2.main.app.commons.book.BookView; 12 import org.sophie2.main.app.commons.book.BaseBookView; 13 import org.sophie2.main.app.commons.book.BookViewOptions.BookEditLevel; 13 14 import org.sophie2.main.app.commons.util.AppViewUtil; 14 15 import org.sophie2.main.app.menus.AppMenuItem; 15 16 … … 32 33 33 34 @Override 34 35 protected boolean computeEnabled() { 35 B ookView bv = AppViewUtil.getCurrentBookView(this);36 BaseBookView bv = AppViewUtil.getCurrentBaseBookView(this); 36 37 37 38 return bv != null && !bv.getViewOptions().isPreviewMode() 38 && bv.getViewOptions(). isShowControls()39 && bv.getViewOptions().getBookEditLevel().compareTo(BookEditLevel.BOOK) >= 0 39 40 && !(bv.getAccess() instanceof DelegatingServerAccess); 40 41 } 41 42 } -
modules/org.sophie2.main.func.timelines/src/main/java/org/sophie2/main/func/timelines/hud/TimelinesHudButton.java
9 9 import org.sophie2.base.visual.skins.RelatedChildren; 10 10 import org.sophie2.base.visual.skins.SkinPartDef; 11 11 import org.sophie2.base.visual.skins.VisualElementDef; 12 import org.sophie2.main.app.commons.frame.FrameView; 12 import org.sophie2.main.app.commons.book.BookViewOptions; 13 import org.sophie2.main.app.commons.book.BookViewOptions.BookEditLevel; 13 14 import org.sophie2.main.app.commons.page.PageWorkArea; 14 15 import org.sophie2.main.app.halos.common.AppHaloUtil; 15 16 import org.sophie2.main.app.halos.shared.MainHaloMenu; … … 45 46 46 47 @Override 47 48 protected boolean computeVisible() { 48 PageWorkArea pwa = AppHaloUtil.getWorkArea(this); 49 if (pwa == null) { 50 return false; 51 } 52 53 FrameView frameView = AppHaloUtil.getSingleFrameView(this); 54 if (frameView != null) { 55 // A frame is selected 49 if (AppHaloUtil.getSingleFrameView(this) != null) { 56 50 return true; 57 51 } 58 59 if (0 == pwa.getSel().getSelected().size()) { 60 // Nothing is selected 61 if (pwa.getRootPageView() != null) { 62 // There is root page view. 63 return true; 64 } 52 53 PageWorkArea pwa = AppHaloUtil.getWorkArea(this); 54 if (pwa == null || pwa.getRootPageView() == null || pwa.getSel().getSelected().size() != 0) { 55 return false; 65 56 } 66 // selected element view is not frame view. 67 return false; 57 58 BookViewOptions viewOptions = pwa.bookView().get().getViewOptions(); 59 return viewOptions.getBookEditLevel().compareTo(BookEditLevel.PAGE) >= 0; 68 60 } 69 61 70 62 } -
modules/org.sophie2.main.func.templates/src/main/java/org/sophie2/main/func/templates/frame/FrameTemplateLogic.java
22 22 import org.sophie2.core.mvc.OperationDef; 23 23 import org.sophie2.core.mvc.events.EventR3; 24 24 import org.sophie2.main.app.commons.book.BaseBookDocView; 25 import org.sophie2.main.app.commons.book.BookViewOptions.BookEditLevel; 25 26 import org.sophie2.main.app.commons.element.ElementView; 26 27 import org.sophie2.main.app.commons.frame.FrameView; 27 28 import org.sophie2.main.app.commons.page.MainPageView; … … 102 103 103 104 PageWorkArea workArea = event.getSource(PageWorkArea.class); 104 105 MainPageView pageView = workArea.getRootPageView().mainPartView().get(); 105 if (pageView.getViewOptions().isPreviewMode()) { 106 if (pageView.getViewOptions().isPreviewMode() 107 || pageView.getViewOptions().getBookEditLevel().compareTo(BookEditLevel.PAGE) < 0) { 106 108 return false; 107 109 } 108 110 -
modules/org.sophie2.main.app.halos/src/main/java/org/sophie2/main/app/halos/page/resize/PageResizeHaloMenu.java
9 9 import org.sophie2.base.visual.skins.RelatedChildren; 10 10 import org.sophie2.base.visual.skins.VisualElementDef; 11 11 import org.sophie2.main.app.commons.app.AppMainWindow; 12 import org.sophie2.main.app.commons.book.B ookView;12 import org.sophie2.main.app.commons.book.BaseBookView; 13 13 import org.sophie2.main.app.commons.book.BookViewOptions; 14 import org.sophie2.main.app.commons.book.BookViewOptions.BookEditLevel; 14 15 import org.sophie2.main.app.commons.page.PageWorkArea; 15 16 import org.sophie2.main.app.commons.util.AppViewUtil; 16 17 import org.sophie2.main.app.halos.common.AppHaloUtil; … … 45 46 @Override 46 47 protected boolean computeVisible() { 47 48 48 B ookView bookView = AppViewUtil.getCurrentBookView(this);49 BaseBookView bookView = AppViewUtil.getCurrentBaseBookView(this); 49 50 if (bookView == null) { 50 51 return false; 51 52 } 52 53 53 54 BookViewOptions options = bookView.getViewOptions(); 54 if (options.isPreviewMode() || !options.isShowControls()) { 55 return false; 56 } 57 return true; 55 return !options.isPreviewMode() 56 && options.getBookEditLevel().compareTo(BookEditLevel.BOOK) >= 0; 58 57 } 59 58 } -
modules/org.sophie2.main.app.halos/src/main/java/org/sophie2/main/app/halos/shared/AddTemplateHaloButton.java
35 35 import org.sophie2.core.mvc.OperationDef; 36 36 import org.sophie2.core.mvc.events.EventR3; 37 37 import org.sophie2.main.app.commons.book.BaseBookView; 38 import org.sophie2.main.app.commons.book.BookViewOptions; 39 import org.sophie2.main.app.commons.book.BookViewOptions.BookEditLevel; 38 40 import org.sophie2.main.app.commons.dialogs.CreateTemplateDialog; 39 41 import org.sophie2.main.app.commons.dialogs.TemplateInfo; 40 42 import org.sophie2.main.app.commons.element.ElementView; … … 79 81 } 80 82 81 83 @Override 82 protected boolean computeVisible() { 83 84 if (AppHaloUtil.getSingleFrameView(this) != null) { 85 return true; 86 } 87 84 protected boolean computeVisible() { 88 85 PageWorkArea pwa = AppHaloUtil.getWorkArea(this); 89 86 if (pwa == null || pwa.getRootPageView() == null) { 90 87 return false; 91 88 } 92 89 90 FrameView frameView = AppHaloUtil.getSingleFrameView(this); 91 BookH book = pwa.bookView().get().model().get(); 92 if (frameView != null && !TemplateUtil.isFrameTemplate(book, frameView.model().get().getRef())) { 93 return true; 94 } 95 96 // the model might be the page 93 97 if (pwa.getSel().getSelected().size() != 0) { 94 98 return false; 99 } 100 if (TemplateUtil.isPageTemplate(book, pwa.getRootPageView().model().get().getRef())) { 101 return false; 95 102 } 96 97 return !TemplateUtil.isPageTemplate(pwa.bookView().get().model().get(),98 pwa.getRootPageView().model().get().getRef());103 104 BookViewOptions viewOptions = pwa.bookView().get().getViewOptions(); 105 return viewOptions.getBookEditLevel().compareTo(BookEditLevel.PAGE) >= 0; 99 106 } 100 107 101 108 @Override -
modules/org.sophie2.main.func.templates/src/main/java/org/sophie2/main/func/templates/book/SaveBookAsTemplateItem.java
5 5 import org.sophie2.base.skins.SkinElementId; 6 6 import org.sophie2.base.visual.skins.ElementPartCreator; 7 7 import org.sophie2.base.visual.skins.SkinPartDef; 8 import org.sophie2.main.app.commons.book.BookViewOptions.BookEditLevel; 8 9 import org.sophie2.main.app.menus.AppMenuItem; 9 10 10 11 /** … … 25 26 26 27 27 28 @Override 28 protected boolean computeEnabled() { 29 protected boolean computeEnabled() { 29 30 return getCurrentBookDocView() != null 30 31 && !getCurrentBookDocView().bookView().get().getViewOptions().isPreviewMode() 31 && getCurrentBookDocView().bookView().get().getViewOptions(). isShowControls();32 && getCurrentBookDocView().bookView().get().getViewOptions().getBookEditLevel().compareTo(BookEditLevel.BOOK) >= 0; 32 33 } 33 34 } -
modules/org.sophie2.main.app.commons/src/main/java/org/sophie2/main/app/commons/book/BaseBookDocView.java
232 232 233 233 modelSwing.setLayout(new BorderLayout()); 234 234 235 if (bookView().get().getViewOptions().isShow Controls()) {235 if (bookView().get().getViewOptions().isShowViewControls()) { 236 236 modelSwing.add(viewOptionsScrollPane().get(), BorderLayout.NORTH); 237 237 modelSwing.add(workAreaPane().get(), BorderLayout.CENTER); 238 238 } else { … … 270 270 271 271 @Override 272 272 protected void setup(JScrollPane res) { 273 if (bookView().get().getViewOptions().isShow Controls()) {273 if (bookView().get().getViewOptions().isShowViewControls()) { 274 274 res.setViewportView(workArea().get().swingComponent().get()); 275 275 } 276 276 res.validate(); -
modules/org.sophie2.main.app.halos/src/main/java/org/sophie2/main/app/halos/shared/MainHaloMenu.java
88 88 // we are not in preview mode. 89 89 if (pwa.getSel().getSelected().size() == 0) { 90 90 // nothing is selected 91 if (!viewOptions.isShow Controls()) {91 if (!viewOptions.isShowViewControls()) { 92 92 // show controls view option is off. 93 93 return false; 94 94 } -
modules/org.sophie2.main.app.menus/src/main/java/org/sophie2/main/app/menus/file/SaveBookAsTemplateItem.java
5 5 import org.sophie2.base.skins.SkinElementId; 6 6 import org.sophie2.base.visual.skins.ElementPartCreator; 7 7 import org.sophie2.base.visual.skins.SkinPartDef; 8 import org.sophie2.main.app.commons.book.BookView; 8 import org.sophie2.main.app.commons.book.BaseBookView; 9 import org.sophie2.main.app.commons.book.BookViewOptions.BookEditLevel; 9 10 import org.sophie2.main.app.commons.util.AppViewUtil; 10 11 import org.sophie2.main.app.menus.AppMenuItem; 11 12 … … 28 29 29 30 @Override 30 31 protected boolean computeEnabled() { 31 B ookView bookView = AppViewUtil.getCurrentBookView(this);32 BaseBookView bookView = AppViewUtil.getCurrentBaseBookView(this); 32 33 return bookView != null && !bookView.getViewOptions().isPreviewMode() 33 && bookView.getViewOptions(). isShowControls();34 && bookView.getViewOptions().getBookEditLevel().compareTo(BookEditLevel.BOOK) >= 0; 34 35 } 35 36 } -
modules/org.sophie2.main.func.templates/src/main/java/org/sophie2/main/func/templates/page/PageTemplatesPalette.java
27 27 import org.sophie2.core.prolib.interfaces.Prop; 28 28 import org.sophie2.main.app.commons.app.AppMainWindow; 29 29 import org.sophie2.main.app.commons.book.BaseBookDocView; 30 import org.sophie2.main.app.commons.book.BookViewOptions; 30 31 import org.sophie2.main.app.commons.book.SinglePageBookDocView; 32 import org.sophie2.main.app.commons.book.BookViewOptions.BookEditLevel; 31 33 import org.sophie2.main.app.commons.util.AppViewUtil; 32 34 33 35 /** … … 223 225 224 226 SinglePageBookDocView window = 225 227 AppViewUtil.getView(mainWindow, newAccess, SinglePageBookDocView.class); 228 window.bookView().get().setViewOptions( 229 new BookViewOptions(1.0f, false, true, false, true, BookEditLevel.PAGE)); 226 230 window.initPageRef(bookToTemplateRef); 231 window.initDeletePageOnClose(false); 227 232 mainWindow.documents().add(window); 228 233 mainWindow.currentDocument().set(window); 229 234 -
modules/org.sophie2.main.app.commons/src/main/java/org/sophie2/main/app/commons/app/DocumentsLogic.java
4 4 import org.sophie2.base.layout.impl.DefaultDocView; 5 5 import org.sophie2.base.model.resources.r4.ResourceRefR4; 6 6 import org.sophie2.base.model.resources.r4.access.ResourceAccess; 7 import org.sophie2.base.model.resources.r4.changes.AutoAction; 8 import org.sophie2.base.skins.Message; 7 9 import org.sophie2.core.logging.SophieLog; 8 10 import org.sophie2.core.modularity.SortKey; 9 11 import org.sophie2.core.mvc.EventFilterBuilder; … … 12 14 import org.sophie2.core.mvc.OperationDef; 13 15 import org.sophie2.core.mvc.events.EventR3; 14 16 import org.sophie2.main.app.commons.book.BookDocView; 17 import org.sophie2.main.app.commons.book.SinglePageBookDocView; 15 18 import org.sophie2.main.app.commons.util.AppViewUtil; 16 19 import org.sophie2.main.app.commons.util.SaveDocUtil; 17 20 import org.sophie2.main.dialogs.input.ConfirmDialogInput; … … 62 65 return true; 63 66 } 64 67 }, 68 69 /** 70 * If necessary, deletes the temporary page shown by a {@link SinglePageBookDocView} 71 * before closing it. 72 */ 73 @SortKey("ooo-delete-page-on-document-close") 74 ON_CLOSE_SINGLE_PAGE_BOOK_DOC_VIEW { 65 75 76 public void defineFilter(EventFilterBuilder filter) { 77 filter.setSourceClass(SinglePageBookDocView.class); 78 filter.setEventId(DefaultDocView.EventIds.CLOSE); 79 } 80 81 public boolean handle(EventR3 event) { 82 83 SinglePageBookDocView window = event.getSource(SinglePageBookDocView.class); 84 if (window.deletePageOnClose().get()) { 85 86 final ResourceRefR4 pageRef = window.getPageRef(); 87 System.out.println(pageRef); 88 89 new AutoAction(Message.create("aaa!"), true) { 90 91 @Override 92 public void performAuto() { 93 getChanger().removeResource(pageRef); 94 } 95 96 }.register(window.model().get().getAccess()); 97 } 98 99 return false; 100 } 101 }, 102 66 103 /** 67 104 * Handles a user request to close the document window. Asks for 68 105 * confirmation before closing. -
modules/org.sophie2.main.app.commons/src/main/java/org/sophie2/main/app/commons/element/ElementLogic.java
44 44 import org.sophie2.main.app.commons.app.AppMainWindow; 45 45 import org.sophie2.main.app.commons.book.BaseBookDocView; 46 46 import org.sophie2.main.app.commons.book.BaseBookView; 47 import org.sophie2.main.app.commons.book.BookViewOptions; 48 import org.sophie2.main.app.commons.book.BookViewOptions.BookEditLevel; 47 49 import org.sophie2.main.app.commons.frame.FrameView; 48 50 import org.sophie2.main.app.commons.page.PageWorkArea; 49 51 import org.sophie2.main.app.commons.page.PwaSelector; … … 148 150 if (docView == null) { 149 151 return false; 150 152 } 153 154 BookViewOptions viewOptions = docView.bookView().get().getViewOptions(); 155 if (viewOptions.isPreviewMode() 156 || viewOptions.getBookEditLevel().compareTo(BookEditLevel.PAGE) < 0) { 157 return false; 158 } 159 151 160 PageWorkArea workArea = docView.workArea().get(); 152 161 153 162 ElementView parentView = workArea.getSel().getEditScope(); … … 222 231 parentCh.setRaw(CompositeElement.KEY_SUB_ELEMENTS, newChannels); 223 232 } 224 233 }.register(book.getAccess()); 234 235 return true; 225 236 } 226 237 227 238 return false; … … 305 316 306 317 private static void handleCutOrCopy(VisualElement source, Operation operation) { 307 318 BaseBookDocView docView = AppViewUtil.getCurrentBookDocView(source); 308 if (docView == null || docView.bookView().get().getViewOptions().isPreviewMode()) { 319 if (docView == null || docView.bookView().get().getViewOptions().isPreviewMode() 320 || docView.bookView().get().getViewOptions().getBookEditLevel().compareTo( 321 BookEditLevel.PAGE) < 0) { 309 322 return; 310 323 } 311 324 PageWorkArea workArea = docView.workArea().get(); -
modules/org.sophie2.main.app.halos/src/main/java/org/sophie2/main/app/halos/frame/FrameRemoveHaloButton.java
9 9 import org.sophie2.base.visual.skins.ElementPartCreator; 10 10 import org.sophie2.base.visual.skins.SkinPartDef; 11 11 import org.sophie2.base.visual.skins.VisualElementDef; 12 import org.sophie2.main.app.commons.book.BaseBookView; 13 import org.sophie2.main.app.commons.book.BookViewOptions.BookEditLevel; 14 import org.sophie2.main.app.commons.util.AppViewUtil; 12 15 import org.sophie2.main.app.halos.common.AppHaloUtil; 13 16 import org.sophie2.main.app.halos.shared.MainHaloMenu; 14 17 … … 36 39 37 40 @Override 38 41 protected boolean computeVisible() { 39 return AppHaloUtil.getSingleFrameView(this) != null; 42 if (AppHaloUtil.getSingleFrameView(this) == null) { 43 return false; 44 } 45 46 BaseBookView bookView = AppViewUtil.getCurrentBaseBookView(this); 47 return bookView != null 48 && bookView.getViewOptions().getBookEditLevel().compareTo(BookEditLevel.PAGE) >= 0; 40 49 } 41 50 42 51 @Override -
modules/org.sophie2.main.app.commons/src/main/java/org/sophie2/main/app/commons/book/SinglePageBookDocView.java
8 8 import org.sophie2.base.model.resources.r4.changes.AutoAction; 9 9 import org.sophie2.base.model.resources.r4.resources.ResourceR4; 10 10 import org.sophie2.base.skins.Message; 11 import org.sophie2.core.prolib.interfaces.Prop; 11 12 import org.sophie2.main.app.commons.app.AppMainWindow; 12 13 import org.sophie2.main.app.commons.util.AppViewUtil; 13 14 … … 48 49 SinglePageBookView view = new SinglePageBookView(getAccess(), viewOptions); 49 50 getBean().init(bookView(), view); 50 51 } 52 53 /** 54 * Whether the page should be deleted on closing the window. 55 * This might be necessary if a temporary page was created in order to show some 56 * page elements (for example, frame templates). 57 * 58 * @return 59 * The property. 60 */ 61 public Prop<Boolean> deletePageOnClose() { 62 return getBean().makeFinalProp("deletePageOnClose", Boolean.class); 63 } 64 65 /** 66 * Initializes the option whether to delete the page on closing the window. 67 * 68 * @param deletePageOnClose 69 * Whether to delete the page on closing the window. 70 */ 71 public void initDeletePageOnClose(boolean deletePageOnClose) { 72 getBean().init(deletePageOnClose(), deletePageOnClose); 73 } 51 74 52 75 /** 53 76 * Initializes the page that should be displayed. … … 59 82 ((SinglePageBookView)bookView().get()).initPageRef(pageRef); 60 83 } 61 84 85 /** 86 * Gets a reference to the page that should be displayed. 87 * 88 * @return 89 * A reference to the page that should be displayed. 90 */ 91 public ResourceRefR4 getPageRef() { 92 return ((SinglePageBookView)bookView().get()).pageRef().get(); 93 } 94 62 95 @Override 63 96 protected String computeTitle() { 64 97 if (model() != null) { … … 83 116 SinglePageBookDocView newView = new SinglePageBookDocView(clone.getAccess(), 84 117 BookViewOptions.DEFAULT_READER); 85 118 ResourceRefR4 pageRef = ((SinglePageBookView) bookView().get()).pageRef().get(); 119 newView.initDeletePageOnClose(false); 86 120 newView.initPageRef(pageRef); 87 121 88 122 PageH page = ((SinglePageBookView) newView.bookView().get()).page().get(); -
modules/org.sophie2.main.app.menus/src/main/java/org/sophie2/main/app/menus/insert/InsertMenu.java
7 7 import org.sophie2.base.visual.skins.SkinPartDef; 8 8 import org.sophie2.main.app.commons.book.BaseBookView; 9 9 import org.sophie2.main.app.commons.book.BookView; 10 import org.sophie2.main.app.commons.book.BookViewOptions.BookEditLevel; 10 11 import org.sophie2.main.app.menus.AppMenu; 11 12 12 13 /** … … 39 40 */ 40 41 // TODO: Why is this method here ??? 41 42 public static boolean isEditable(BaseBookView bookWindow) { 42 return bookWindow != null && !bookWindow.getViewOptions().isPreviewMode(); 43 return bookWindow != null && !bookWindow.getViewOptions().isPreviewMode() 44 && bookWindow.getViewOptions().getBookEditLevel().compareTo(BookEditLevel.PAGE) >= 0; 43 45 } 44 46 } -
modules/org.sophie2.main.func.templates/src/main/java/org/sophie2/main/func/templates/MainFuncTemplatesModule.java
67 67 SimpleOperation.fillExtensions(res, CompositeTemplateLogic.class); 68 68 69 69 SimpleOperation.fillExtensions(res, PageTemplatesPalette.PaletteLogic.class); 70 SimpleOperation.fillExtensions(res, FrameTemplatesPalette.PaletteLogic.class); 70 71 71 72 res.add(new SimpleSophieExtension<Dialog>(Dialog.class, 72 73 new ApplyPageTemplateDialog())); -
modules/org.sophie2.main.app.menus/src/main/java/org/sophie2/main/app/menus/file/SaveBookAsItem.java
9 9 import org.sophie2.base.skins.SkinElementId; 10 10 import org.sophie2.base.visual.skins.ElementPartCreator; 11 11 import org.sophie2.base.visual.skins.SkinPartDef; 12 import org.sophie2.main.app.commons.book.BookView; 12 import org.sophie2.main.app.commons.book.BaseBookView; 13 import org.sophie2.main.app.commons.book.BookViewOptions.BookEditLevel; 13 14 import org.sophie2.main.app.commons.util.AppViewUtil; 14 15 import org.sophie2.main.app.menus.AppMenuItem; 15 16 … … 33 34 34 35 @Override 35 36 protected boolean computeEnabled() { 36 B ookView bookView = AppViewUtil.getCurrentBookView(this);37 BaseBookView bookView = AppViewUtil.getCurrentBaseBookView(this); 37 38 return bookView != null && !bookView.getViewOptions().isPreviewMode() 38 && bookView.getViewOptions(). isShowControls();39 && bookView.getViewOptions().getBookEditLevel().compareTo(BookEditLevel.BOOK) >= 0; 39 40 } 40 41 } -
modules/org.sophie2.main.func.links/src/main/java/org/sophie2/main/func/links/ElementLinksHaloButton.java
1 1 package org.sophie2.main.func.links; 2 2 3 import java.util.List;4 5 3 import org.sophie2.base.commons.skin.IconId; 6 4 import org.sophie2.base.commons.skin.IconsSet; 7 5 import org.sophie2.base.commons.util.ImageUtil; … … 11 9 import org.sophie2.base.visual.skins.RelatedChildren; 12 10 import org.sophie2.base.visual.skins.SkinPartDef; 13 11 import org.sophie2.base.visual.skins.VisualElementDef; 14 import org.sophie2.main.app.commons.element.ElementView; 12 import org.sophie2.main.app.commons.book.BookViewOptions; 13 import org.sophie2.main.app.commons.book.BookViewOptions.BookEditLevel; 15 14 import org.sophie2.main.app.commons.page.PageWorkArea; 16 15 import org.sophie2.main.app.halos.common.AppHaloUtil; 17 16 import org.sophie2.main.app.halos.shared.MainHaloMenu; … … 42 41 43 42 @Override 44 43 protected boolean computeVisible() { 45 PageWorkArea pwa = AppHaloUtil.getWorkArea(this); 44 if (AppHaloUtil.getSingleFrameView(this) != null) { 45 return true; 46 } 46 47 47 if (pwa == null) { 48 PageWorkArea pwa = AppHaloUtil.getWorkArea(this); 49 if (pwa == null || pwa.getRootPageView() == null || pwa.getSel().getSelected().size() != 0) { 48 50 return false; 49 51 } 50 51 List<ElementView> selected = pwa.getSel().getSelected(); 52 return ((AppHaloUtil.getSingleFrameView(this) != null) 53 || selected.size() == 0); 52 53 BookViewOptions viewOptions = pwa.bookView().get().getViewOptions(); 54 return viewOptions.getBookEditLevel().compareTo(BookEditLevel.PAGE) >= 0; 54 55 } 55 56 56 57 @Override -
modules/org.sophie2.main.func.templates/src/main/java/org/sophie2/main/func/templates/frame/FrameTemplatesPalette.java
9 9 import org.sophie2.base.dnd.SophieDragDropHandler; 10 10 import org.sophie2.base.layout.model.ListPalette; 11 11 import org.sophie2.base.layout.model.ListPaletteItem; 12 import org.sophie2.base.model.book.BookH; 12 13 import org.sophie2.base.model.book.FrameH; 14 import org.sophie2.base.model.book.PageH; 15 import org.sophie2.base.model.book.interfaces.CompositeElement; 16 import org.sophie2.base.model.book.resource.r4.PageR4; 17 import org.sophie2.base.model.book.timelines.ActivationChannel; 13 18 import org.sophie2.base.model.resources.r4.ResourceRefR4; 14 19 import org.sophie2.base.model.resources.r4.access.ResourceAccess; 20 import org.sophie2.base.model.resources.r4.changes.AutoAction; 21 import org.sophie2.base.model.resources.r4.changes.ResourceChanger; 15 22 import org.sophie2.base.model.resources.r4.resources.ResourceH; 23 import org.sophie2.base.model.resources.r4.resources.ResourceR4; 24 import org.sophie2.base.skins.Message; 16 25 import org.sophie2.base.skins.SkinElementId; 17 26 import org.sophie2.base.visual.BaseVisualElement; 18 27 import org.sophie2.base.visual.skins.ElementPartCreator; 19 28 import org.sophie2.base.visual.skins.SkinPartDef; 29 import org.sophie2.core.mvc.EventFilterBuilder; 20 30 import org.sophie2.core.mvc.EventParams; 21 31 import org.sophie2.core.mvc.LogicR3; 32 import org.sophie2.core.mvc.OperationDef; 33 import org.sophie2.core.mvc.events.EventR3; 22 34 import org.sophie2.core.prolib.impl.AutoProperty; 23 35 import org.sophie2.core.prolib.interfaces.Prop; 36 import org.sophie2.main.app.commons.app.AppMainWindow; 24 37 import org.sophie2.main.app.commons.book.BaseBookDocView; 38 import org.sophie2.main.app.commons.book.BookViewOptions; 39 import org.sophie2.main.app.commons.book.SinglePageBookDocView; 40 import org.sophie2.main.app.commons.book.BookViewOptions.BookEditLevel; 25 41 import org.sophie2.main.app.commons.util.AppViewUtil; 26 42 43 27 44 /** 28 45 * Frames templates palette. Used to contain frame templates which could be 29 46 * applied to a frame by double clicking on an item in the list. … … 103 120 104 121 @Override 105 122 public void doubleClicked() { 106 LogicR3.fire( FrameTemplatesPalette.this, null, null, null, FrameTemplatesPalette.EventIds.APPLY_FRAME_TEMPLATE);107 }123 LogicR3.fire(this, FrameTemplatesPalette.this, 124 null, null, FrameTemplatesPalette.EventIds.OPEN_FRAME_TEMPLATE); } 108 125 109 126 @Override 110 127 public void keyPressed(KeyEvent e) { … … 171 188 * Deletes a frame template. 172 189 */ 173 190 @EventParams( {}) 174 DELETE_FRAME_TEMPLATE; 191 DELETE_FRAME_TEMPLATE, 192 193 /** 194 * Opens the selected frame template for editing in its own window. 195 */ 196 @EventParams({}) 197 OPEN_FRAME_TEMPLATE; 175 198 } 199 200 /** 201 * Logic connected to {@link FrameTemplatesPalette}. 202 * 203 * @author deni 204 */ 205 public enum PaletteLogic implements OperationDef { 206 207 /** 208 * Opens a frame template for editing in its own window. 209 */ 210 ON_OPEN_FRAME_TEMPLATE { 211 212 public void defineFilter(EventFilterBuilder filter) { 213 filter.setSourceClass(FrameTemplateItem.class); 214 filter.setEventId(EventIds.OPEN_FRAME_TEMPLATE); 215 } 216 217 public boolean handle(EventR3 event) { 218 219 FrameTemplatesPalette palette = event.getContext(FrameTemplatesPalette.class); 220 BaseBookDocView bdw = AppViewUtil.getCurrentBookDocView(palette); 221 if (bdw.bookView().get().getViewOptions().isPreviewMode()) { 222 return false; 223 } 224 BookH book = bdw.model().get(); 225 AppMainWindow mainWindow = AppViewUtil.findMainWindow(palette); 226 227 FrameTemplateItem source = event.getSource(FrameTemplateItem.class); 228 FrameH templateH = source.frame().get(); 229 230 final ResourceRefR4 pageRef = ResourceRefR4.generateRandomSub(PageH.NAME_PREFIX); 231 final String pageTitle = templateH.getTitle(); 232 233 ResourceRefR4 pageToFrameRef = ResourceRefR4.getRelativeRef( 234 book.getRef().append(pageRef), templateH.getRef()); 235 final ImmList<ActivationChannel> subelements = 236 ImmTreeList.create(new ActivationChannel(pageToFrameRef)); 237 238 ResourceAccess newAccess = book.getAccess().open(ResourceRefR4.CURRENT_REF, 239 book.getAccess().getAccessOptions().modifyViewId()); 240 241 new AutoAction(Message.create("New page"), false) { 242 243 @Override 244 public void performAuto() { 245 ResourceChanger bookChanger = getChanger(); 246 bookChanger.makeResource(pageRef); 247 248 ResourceChanger pageChanger = bookChanger.getSub(pageRef); 249 // TODO: different kind 250 pageChanger.setRaw(ResourceR4.KEY_KIND, PageR4.KIND); 251 pageChanger.setRaw(ResourceR4.KEY_TITLE, pageTitle); 252 pageChanger.setRaw(CompositeElement.KEY_SUB_ELEMENTS, subelements); 253 } 254 255 }.register(newAccess); 256 257 SinglePageBookDocView window = new SinglePageBookDocView(newAccess); 258 window.bookView().get().setViewOptions( 259 new BookViewOptions(1.0f, false, true, false, true, BookEditLevel.FRAME)); 260 window.initPageRef(pageRef); 261 window.initDeletePageOnClose(true); 262 mainWindow.documents().add(window); 263 mainWindow.currentDocument().set(window); 264 265 return true; 266 } 267 } 268 } 176 269 } -
modules/org.sophie2.main.app.commons/src/main/java/org/sophie2/main/app/commons/MainAppModule.java
13 13 import org.sophie2.base.model.book.resource.r4.PageExtraR4; 14 14 import org.sophie2.base.model.book.resource.r4.PageR4; 15 15 import org.sophie2.base.model.resources.r4.resources.ResourceH; 16 import org.sophie2.base.model.resources.r4.resources.ResourceR4; 16 17 import org.sophie2.base.persistence.persister.Persister; 17 18 import org.sophie2.base.visual.AutoVisualProvider; 18 19 import org.sophie2.base.visual.SimpleVisualProvider; … … 60 61 import org.sophie2.main.app.commons.frame.FrameView; 61 62 import org.sophie2.main.app.commons.links.LinkAttachmentPersister; 62 63 import org.sophie2.main.app.commons.links.LinkProcessorLogic; 64 import org.sophie2.main.app.commons.page.DummyPageR4; 63 65 import org.sophie2.main.app.commons.page.ExtraPageView; 64 66 import org.sophie2.main.app.commons.page.MainPageView; 65 67 import org.sophie2.main.app.commons.page.PageWorkArea; … … 238 240 res.add(new SimpleSophieExtension<Persister>(Persister.class, 239 241 new LinkAttachmentPersister())); 240 242 } 243 244 ResourceR4.registerAsExtension(res, DummyPageR4.class); 241 245 } 242 246 } -
modules/org.sophie2.main.app.menus/src/main/java/org/sophie2/main/app/menus/file/BookPropertiesItem.java
5 5 import org.sophie2.base.skins.SkinElementId; 6 6 import org.sophie2.base.visual.skins.ElementPartCreator; 7 7 import org.sophie2.base.visual.skins.SkinPartDef; 8 import org.sophie2.main.app.commons.book.BookView; 8 import org.sophie2.main.app.commons.book.BaseBookView; 9 import org.sophie2.main.app.commons.book.BookViewOptions.BookEditLevel; 9 10 import org.sophie2.main.app.commons.util.AppViewUtil; 10 11 import org.sophie2.main.app.menus.AppMenuItem; 11 12 … … 28 29 29 30 @Override 30 31 protected boolean computeEnabled() { 31 B ookView bookView = AppViewUtil.getCurrentBookView(this);32 BaseBookView bookView = AppViewUtil.getCurrentBaseBookView(this); 32 33 return bookView != null && !bookView.getViewOptions().isPreviewMode() 33 && bookView.getViewOptions(). isShowControls();34 && bookView.getViewOptions().getBookEditLevel().compareTo(BookEditLevel.BOOK) >= 0; 34 35 } 35 36 } -
modules/org.sophie2.main.app.layout/src/main/java/org/sophie2/main/app/layout/left/pages/PagePreviewPalette.java
46 46 import org.sophie2.main.app.commons.book.BaseBookDocView; 47 47 import org.sophie2.main.app.commons.book.BookDocView; 48 48 import org.sophie2.main.app.commons.book.BookView; 49 import org.sophie2.main.app.commons.book.BookViewOptions; 50 import org.sophie2.main.app.commons.book.BookViewOptions.BookEditLevel; 49 51 import org.sophie2.main.app.commons.element.ElementView; 50 52 import org.sophie2.main.app.commons.page.RootPageView; 51 53 import org.sophie2.main.app.commons.util.AppViewUtil; … … 590 592 static boolean shouldShowButtons(VisualElement button) { 591 593 592 594 BaseBookDocView docView = AppViewUtil.getCurrentBookDocView(button); 595 if (docView == null || docView.bookView().get() == null) { 596 return false; 597 } 598 BookViewOptions viewOptions = docView.bookView().get().getViewOptions(); 593 599 594 return (docView != null 595 && !docView.bookView().get().getViewOptions().isPreviewMode() 596 && docView.bookView().get().getViewOptions().isShowControls()); 600 return !viewOptions.isPreviewMode() 601 && viewOptions.getBookEditLevel().compareTo(BookEditLevel.BOOK) >= 0; 597 602 } 598 603 599 604 /** -
modules/org.sophie2.main.func.resources/src/main/java/org/sophie2/main/func/resources/logic/ResourceImportLogic.java
42 42 import org.sophie2.main.app.commons.book.BaseBookDocView; 43 43 import org.sophie2.main.app.commons.book.BookView; 44 44 import org.sophie2.main.app.commons.book.BookViewOptions; 45 import org.sophie2.main.app.commons.book.BookViewOptions.BookEditLevel; 45 46 import org.sophie2.main.app.commons.element.ElementView; 46 47 import org.sophie2.main.app.commons.frame.FrameView; 47 48 import org.sophie2.main.app.commons.page.MainPageView; … … 204 205 205 206 if (bookDocView != null) { 206 207 BookViewOptions viewOptions = bookDocView.bookView().get().getViewOptions(); 207 if (!viewOptions.isPreviewMode()) { 208 if (!viewOptions.isPreviewMode() 209 && viewOptions.getBookEditLevel().compareTo(BookEditLevel.PAGE) >= 0) { 208 210 209 211 DndTransferable transferable = event.getEventParam( 210 212 ImportEventIds.DND_TRANSFERABLE_PARAM_INDEX, … … 342 344 public boolean handle(EventR3 event) { 343 345 PageWorkArea pwa = event.getSource(PageWorkArea.class); 344 346 MainPageView view = pwa.getRootPageView().mainPartView().get(); 345 if (view.getViewOptions().isPreviewMode()) { 347 if (view.getViewOptions().isPreviewMode() 348 || view.getViewOptions().getBookEditLevel().compareTo(BookEditLevel.PAGE) < 0) { 346 349 return false; 347 350 } 348 351 -
modules/org.sophie2.extra.comment/src/test/java/org/sophie2/extra/comment/logic/CommentLogicTest.java
47 47 import org.sophie2.main.app.commons.book.BookDocView; 48 48 import org.sophie2.main.app.commons.book.BookView; 49 49 import org.sophie2.main.app.commons.book.BookViewOptions; 50 import org.sophie2.main.app.commons.book.BookViewOptions.BookEditLevel; 50 51 import org.sophie2.main.app.commons.book.panels.PreviewModePanel; 51 52 import org.sophie2.main.app.commons.testing.AppTestBase; 52 53 import org.sophie2.main.app.menus.MainAppMenusModule; … … 67 68 68 69 ResourceAccess bookAccess = makeBookAccess(); 69 70 BookDocView window = new BookDocView(bookAccess, new BookViewOptions(1, true, false, false, 70 true ));71 true, BookEditLevel.BOOK)); 71 72 getAppMainWindow().documents().add(window); 72 73 getAppMainWindow().currentDocument().set(window); 73 74 } -
modules/org.sophie2.main.func.templates/src/main/java/org/sophie2/main/func/templates/page/PageTemplateLogic.java
24 24 import org.sophie2.core.mvc.events.EventR3; 25 25 import org.sophie2.main.app.commons.book.BaseBookDocView; 26 26 import org.sophie2.main.app.commons.book.BaseBookView; 27 import org.sophie2.main.app.commons.book.BookViewOptions.BookEditLevel; 27 28 import org.sophie2.main.app.commons.element.ElementView; 28 29 import org.sophie2.main.app.commons.frame.FrameView; 29 30 import org.sophie2.main.app.commons.page.MainPageView; … … 64 65 DndPreImport.class); 65 66 66 67 RootPageView pageView = event.getSource(RootPageView.class); 67 if (pageView.getViewOptions().isPreviewMode()) { 68 if (pageView.getViewOptions().isPreviewMode() 69 || pageView.getViewOptions().getBookEditLevel().compareTo(BookEditLevel.PAGE) < 0) { 68 70 return false; 69 71 } 70 72 -
modules/org.sophie2.main.app.halos/src/main/java/org/sophie2/main/app/halos/frame/RightSideHaloMenu.java
4 4 import org.sophie2.base.visual.skins.RelatedChildren; 5 5 import org.sophie2.base.visual.skins.VisualElementDef; 6 6 import org.sophie2.main.app.commons.app.AppMainWindow; 7 import org.sophie2.main.app.commons.book.BookViewOptions; 8 import org.sophie2.main.app.commons.book.BookViewOptions.BookEditLevel; 7 9 import org.sophie2.main.app.commons.page.PageWorkArea; 8 10 import org.sophie2.main.app.halos.common.AppHaloUtil; 9 11 import org.sophie2.main.app.halos.shared.SelectionHaloMenu; … … 25 27 26 28 @Override 27 29 protected boolean computeVisible() { 30 if (AppHaloUtil.getSingleFrameView(this) == null) { 31 return false; 32 } 33 28 34 PageWorkArea pwa = AppHaloUtil.getWorkArea(this); 29 30 if (pwa == null 31 || pwa.bookView().get() == null 32 || pwa.bookView().get().getViewOptions().isPreviewMode() 33 || (pwa.getSel().getSelected().size() == 0 && !pwa.bookView().get() 34 .getViewOptions().isShowControls())) { 35 if (pwa == null || pwa.bookView().get() == null) { 35 36 return false; 36 } 37 38 return true; 37 } 38 BookViewOptions viewOptions = pwa.bookView().get().getViewOptions(); 39 return !viewOptions.isPreviewMode() 40 && viewOptions.getBookEditLevel().compareTo(BookEditLevel.PAGE) >= 0; 39 41 } 40 42 41 43 } -
modules/org.sophie2.main.app.commons/src/main/java/org/sophie2/main/app/commons/book/BookViewOptions.java
12 12 * </ul> 13 13 */ 14 14 @Immutable 15 public class BookViewOptions { 15 public class BookViewOptions { 16 16 17 18 17 private final float zoom; 19 18 private final boolean previewMode; 20 19 private final boolean outlineFrames; 21 20 private final boolean outlineConnections; 22 private final boolean showControls; 21 private final boolean showViewControls; 22 private final BookEditLevel bookEditLevel; 23 23 24 24 /** 25 25 * The default book view options that should be used in reader mode. 26 26 */ 27 27 public static final BookViewOptions DEFAULT_READER = 28 new BookViewOptions(1.0f, true, false, false, true );28 new BookViewOptions(1.0f, true, false, false, true, BookEditLevel.BOOK); 29 29 30 30 /** 31 31 * The default book view options that should be used in author mode. 32 32 */ 33 33 public static final BookViewOptions DEFAULT_AUTHOR = 34 new BookViewOptions(1.0f, false, true, false, true );34 new BookViewOptions(1.0f, false, true, false, true, BookEditLevel.BOOK); 35 35 36 36 /** 37 37 * The default book view options that should be used for the desktop book. 38 38 */ 39 39 public static final BookViewOptions DEFAULT_DESKTOP = 40 new BookViewOptions(1.0f, false, true, false, false );41 40 new BookViewOptions(1.0f, false, true, false, false, BookEditLevel.PAGE); 41 42 42 /** 43 43 * Creates a new <code>BookViewOptions</code> object by the given 44 44 * parameters. … … 53 53 * Whether the connections between frames should be outlined. 54 54 * @param showControls 55 55 * Whether book controls should be shown. 56 * @param bookEditLevel 57 * The book edit level. 56 58 */ 57 59 public BookViewOptions(float zoom, boolean previewMode, boolean outlineFrames, 58 boolean outlineConnections, boolean showControls ) {60 boolean outlineConnections, boolean showControls, BookEditLevel bookEditLevel) { 59 61 super(); 60 62 this.zoom = zoom; 61 63 this.previewMode = previewMode; 62 64 this.outlineFrames = outlineFrames; 63 65 this.outlineConnections = outlineConnections; 64 this.showControls = showControls; 66 this.showViewControls = showControls; 67 this.bookEditLevel = bookEditLevel; 65 68 } 66 69 67 70 /** 68 71 * Gets the zoom level. 69 72 * … … 107 110 108 111 109 112 /** 110 * Retrieves whether the controls of the corresponding {@link BookView}111 * are visible. 113 * Retrieves whether the view controls of the corresponding {@link BookView} 114 * are visible. Currently they are in the {@link BookPanel}. 112 115 * 113 116 * @return 114 117 * Whether the controls of the view are shown. 115 118 */ 116 public boolean isShow Controls() {117 return this.show Controls;119 public boolean isShowViewControls() { 120 return this.showViewControls; 118 121 } 122 123 /** 124 * Retrieves the book edit level. 125 * 126 * @return 127 * The book edit level. 128 */ 129 public BookEditLevel getBookEditLevel() { 130 return this.bookEditLevel; 131 } 119 132 120 133 /** 121 134 * Returns a <code>BookViewOptions</code> object which has the same … … 134 147 return this; 135 148 } 136 149 return new BookViewOptions(newZoom, this.previewMode, this.outlineFrames, 137 this.outlineConnections, this.show Controls);150 this.outlineConnections, this.showViewControls, this.bookEditLevel); 138 151 } 139 152 140 153 /** … … 154 167 return this; 155 168 } 156 169 return new BookViewOptions(this.zoom, this.previewMode, outlineFrames, 157 this.outlineConnections, this.show Controls);170 this.outlineConnections, this.showViewControls, this.bookEditLevel); 158 171 } 159 172 160 173 /** … … 175 188 return this; 176 189 } 177 190 return new BookViewOptions(this.zoom, this.previewMode, this.outlineFrames, 178 outlineConnections, this.show Controls);191 outlineConnections, this.showViewControls, this.bookEditLevel); 179 192 } 180 193 181 194 /** … … 188 201 * The modified options. 189 202 */ 190 203 public BookViewOptions modifyShowControls(boolean controlsShown) { 191 if (this.show Controls == controlsShown) {204 if (this.showViewControls == controlsShown) { 192 205 return this; 193 206 } 194 return new BookViewOptions(this.zoom, this.previewMode, 195 this.outlineFrames, this.outlineConnections, controlsShown);207 return new BookViewOptions(this.zoom, this.previewMode, this.outlineFrames, 208 this.outlineConnections, controlsShown, this.bookEditLevel); 196 209 197 210 } 211 212 /** 213 * Creates new <code>BookViewOptions</code> copy of this, but 214 * with <var>bookEditLevel</var> as the passed ones. 215 * 216 * @param bookEditLevel 217 * The value of <var>bookEditLevel</var> of the new options. 218 * @return 219 * The modified options. 220 */ 221 @SuppressWarnings("hiding") 222 public BookViewOptions modifyBookEditLevel(BookEditLevel bookEditLevel) { 223 if (this.bookEditLevel == bookEditLevel) { 224 return this; 225 } 226 return new BookViewOptions(this.zoom, this.previewMode, this.outlineFrames, 227 this.outlineConnections, this.showViewControls, bookEditLevel); 228 229 } 198 230 199 231 @Override 200 232 public int hashCode() { … … 203 235 result = prime * result + (this.outlineConnections ? 1231 : 1237); 204 236 result = prime * result + (this.outlineFrames ? 1231 : 1237); 205 237 result = prime * result + (this.previewMode ? 1231 : 1237); 206 result = prime * result + (this.show Controls ? 1231 : 1237);238 result = prime * result + (this.showViewControls ? 1231 : 1237); 207 239 result = prime * result + Float.floatToIntBits(this.zoom); 240 result = prime * result + this.bookEditLevel.hashCode(); 208 241 return result; 209 242 } 210 211 @Override 212 public boolean equals(Object obj) { 213 if (this == obj) { 214 return true; 215 } 216 if (obj == null) { 217 return false; 218 } 219 if (getClass() != obj.getClass()) { 220 return false; 221 } 222 BookViewOptions other = (BookViewOptions) obj; 243 244 /** 245 * Defines the edit level of a {@link BookView}. Can be used to determine 246 * whether some controls are visible or enabled. 247 * 248 * @author deni 249 */ 250 public static enum BookEditLevel { 223 251 224 return this.outlineConnections == other.outlineConnections 225 && this.outlineFrames == other.outlineFrames 226 && this.previewMode == other.previewMode 227 && this.showControls == other.showControls 228 && Float.floatToIntBits(this.zoom) == Float.floatToIntBits(other.zoom); 252 // The definition order is important. 229 253 254 /** 255 * Only a single frame can be edited. 256 */ 257 FRAME, 230 258 231 } 259 /** 260 * A single page (including all its sub-elements) can be edited. 261 */ 262 PAGE, 263 264 /** 265 * The whole book can be edited. 266 */ 267 BOOK; 268 } 232 269 } 270 No newline at end of file -
modules/org.sophie2.main.func.servers/src/main/java/org/sophie2/main/func/servers/view/SaveBookOnServerItem.java
9 9 import org.sophie2.base.skins.SkinElementId; 10 10 import org.sophie2.base.visual.skins.ElementPartCreator; 11 11 import org.sophie2.base.visual.skins.SkinPartDef; 12 import org.sophie2.main.app.commons.book.BookView; 12 import org.sophie2.main.app.commons.book.BaseBookView; 13 import org.sophie2.main.app.commons.book.BookViewOptions.BookEditLevel; 13 14 import org.sophie2.main.app.commons.util.AppViewUtil; 14 15 import org.sophie2.main.app.menus.AppMenuItem; 15 16 … … 33 34 34 35 @Override 35 36 protected boolean computeEnabled() { 36 B ookView bookView = AppViewUtil.getCurrentBookView(this);37 BaseBookView bookView = AppViewUtil.getCurrentBaseBookView(this); 37 38 return bookView != null && !bookView.getViewOptions().isPreviewMode() 38 && bookView.getViewOptions(). isShowControls();39 && bookView.getViewOptions().getBookEditLevel().compareTo(BookEditLevel.BOOK) >= 0; 39 40 } 40 41 } -
modules/org.sophie2.main.app.halos/src/main/java/org/sophie2/main/app/halos/frame/MainTitleBarHalo.java
191 191 protected PageH compute() { 192 192 PageH res = null; 193 193 PageWorkArea pwa = workArea().get(); 194 if (pwa != null && pwa.getSel().getSelected().size() > 0) { 194 if (pwa != null && pwa.getRootPageView() != null 195 && pwa.getSel().getSelected().size() > 0) { 195 196 res = pwa.getRootPageView().model().get(); 196 197 } 197 198 return res; … … 332 333 new AutoAction(Message.create(SET_LOCATION), false) { 333 334 @Override 334 335 public void performAuto() { 335 ResourceChanger subChanger = getChanger().getSub(frameRef); 336 337 subChanger.setRaw(MemberElement.KEY_LOCATION, oldChanel 338 .setValue(time, newValue)); 336 ResourceChanger changer = getChanger(); 337 changer.setRaw(MemberElement.KEY_LOCATION, 338 oldChanel.setValue(time, newValue)); 339 339 } 340 }.register( pageAccess);340 }.register(frameAccess); 341 341 } 342 342 } 343 343