Skip to main content
summaryrefslogtreecommitdiffstats
blob: 12bfb7ef325d99cecd7f5c29fad855cc0a709a3b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
package org.eclipse.fx.ui.controls.styledtext.model;

import org.eclipse.fx.ui.controls.styledtext.internal.TextNode;

import javafx.scene.layout.Pane;

/**
	 * A strategy to decorate the text
	 */
	public interface DecorationStrategy {
		/**
		 * Attach the decoration on the text
		 *
		 * @param node
		 *            the node the decoration is attached to
		 * @param textNode
		 *            the text node decorated
		 */
		public void attach(Pane node, TextNode textNode);

		/**
		 * Remove the decoration from the text
		 *
		 * @param node
		 *            the node the decoration is attached to
		 * @param textNode
		 *            the text node decorated
		 */
		public void unattach(Pane node, TextNode textNode);

		/**
		 * Layout the decoration
		 *
		 * @param node
		 *            the node the layout pass is done on
		 * @param textNode
		 *            the text node decorated
		 */
		public void layout(Pane node, TextNode textNode);
	}

Back to the top