36 | | * added new enum AnchorMode - holds all modes of the anchoring. |
37 | | * added new class Attachment with two attributes: first of type ResourceRef in order to hold the reference of the resource being attached and the second - the anchoring mode of type AnchorMode. |
38 | | * In ImmHotText class add attribute of type Map<Attachment,HotInterval> - it holds map of all the attachments in the text. |
39 | | * In HotTextBookResource class add property of type RwListProp<Resource> to hold all the anchored resources. |
40 | | * Added new class Anchor which extends BaseProObject and implements Element - the element anchor. It has property of type Attachment - it holds the attachment that this anchor refers to, it's parent is of type Frame. |
41 | | * Added new class AnchorView - it's parent is of type SwingTextView(only temporary) and has a property getRelPos - the rel pos of the character that this resource is attached to. |
42 | | * In HotTextView class add new property List<Anchor> - holds all the anchors of the view. |
43 | | |
44 | | * Add 4 classes for the hud (checked work). |
45 | | * The logic should be the following : when the hud is closed : 1:in ImmHotText -> Map a new Entry is added, 2: in the HotTextBookResource is added the real resource , 3: the resource is deleted from it's old holder(will it be the same?) |
46 | | = Implementation = |
| 36 | * in org.sophie2.base.model.text package add interface Attachable which is used to determine which elements could be attached to other ones. |
| 37 | * in ImmHotText class add Map<Interval,Attachment> and change the constructors of the class(in order to initialize the new map) |
| 38 | * in ImmHotText class add getter method getAttachmentMap that returns the map with the text's attachments. |
| 39 | * in org.sophie2.main.func.text.content.view package add a new enum AnchorMode. It holds the six modes of the anchoring. |
| 40 | * add a new package org.sophie2.base.model.text.anchoring |
| 41 | * in org.sophie2.base.model.text.anchoring package add a new class AnchorText implements Attachment. It is used for anchoring in the text. This class contains : |
| 42 | * final mode : AnchorMode |
| 43 | * final resourceRef : ResourceRefR4 |
| 44 | * constructor with two parameters and getters for the mode and for the resourceRef. |
| 45 | * in org.sophie2.main.app.commons.frame package add a new class AnchorView extends ElementView. It's idea is to visualize the anchor as an element in the frame. It's chiledView prop is of type FrameView. This class has public abstract ResourceH getAnchoredModel() method. |
| 46 | * in org.sophie2.main.func.text.anchoring package add a new class AnchorTextView extends AnchorView that represents views of the anchors in the text. |
| 47 | * in HotTextResourceH add a new method public ImmList<ResourceRefR4> getChildren()(this class owns the anchored resources). |
| 48 | * in FrameView add ListProp<AnchorView> that holds all the anchored views in the frame(with annotation Own) |
| 49 | * in HotTextLogic class add ON_INSERT_ANCHOR that contains the logic of adding an anchor to the current text. |
| 50 | * in org.sophie2.main.func.text.anchoring package add a new class TextAnchorHaloButton extends HudHaloButton for the anchoring hud. |
| 51 | * in org.sophie2.main.func.text.anchoring package add a new class TextAnchorHud with two children TextAnchorHud.TextAttachmentComboBox.class, |
| 52 | TextAnchorHud.TextCharacterComboBox.class - the first is to show all the available frames to be attached and the second is to show the available positions in the text that the resource can be attached to. |
| 53 | |
| 54 | = Implementation = |