Subversion Repository Public Repository

litesoft

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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
package org.litesoft.render;

import org.litesoft.logger.*;

public interface RenderHelper
{
    public static final Logger LOGGER = LoggerFactory.getLogger( RenderHelper.class );

    public static final RenderHelper[] EMPTY_ARRAY = new RenderHelper[0];

    /**
     * This is a helper method that is called to notify this Helper that any "determined"
     * state will need to be re"determined".
     * <p/>
     * Any child RenderHelpers that this Helper is holding onto should also be notified.
     *
     * @return true if the Rendering Participation State actually Changed
     */
    public boolean renderingParticipationChanged();

    public boolean isParticipatingInRendering();

    public RenderSizingApproach getSizingApproach();

    public boolean isSizable();

    public RenderDimensionAdapter getDimensionAdapter();

    public RenderHelper getParentHelper();

    /**
     * Restore the RenderableRect to its pre-Layed-out state and return the RenderHelper(s) for its children.
     *
     * @return !null array of the child RenderHelper(s) if any.
     */
    public RenderHelper[] restoreForLayout();

    /**
     * Return if this Helper is current in the Laying Out mode.
     */
    public boolean isLayingOut();

    /**
     * Set the Helper to indicate that we are in the process of Laying Out.
     */
    public void setLayingOut();

    /**
     * Request "this" RederableRect be invalidated from a layout perspective and that it and its related be layed out.
     * <p/>
     * Note: RHPs are Instance Equality Managed, so for the same underlying dependency the same RHP must be returned!
     *
     * @return null if no layout process is needed,
     *         otherwise the returned RHP's callbacks will be notified when it is complete.
     */
    public RenderHelperProcess layout();

    /**
     * Request "this" RederableRect and its' children be layed out.
     * <p/>
     * Note: RHPs are Instance Equality Managed, so for the same underlying dependency the same RHP must be returned!
     *
     * @return null if no layout process is needed,
     *         otherwise the returned RHP's callbacks will be notified when it is complete.
     */
    public RenderHelperProcess layoutFromHereDown();

    /**
     * Determine if this Helper is a Layout Ancestor.
     * <p/>
     * When going up the Parentage path, it will obviously return true at the root, but it may also return true at a Clipping Container that has been explicitly sized!
     */
    public boolean isLayoutAncestorHelper();

    /**
     * Request that the "flood" Size be set to the pRequestedSize.
     * <p/>
     * It will not set the size below the Minimum.
     * <p/>
     * Note: RHPs are Instance Equality Managed, so for the same underlying dependency the same RHP must be returned!
     *
     * @param pRequestedSize - Must be > 0
     *
     * @return !null RHP, where its callbacks will be notified when it is complete.
     *
     * @throws IllegalArgumentException      if pRequestedSize <= 0
     * @throws UnsupportedOperationException if the SizingApproach is "None"
     */
    public RenderHelperProcess floodSetSize( int pRequestedSize )
            throws IllegalArgumentException, UnsupportedOperationException;

    /**
     * Request that the "flood" Size be adjusted by pRequestedSizeChange.
     * <p/>
     * It will not set the size below the Minimum.
     * <p/>
     * Note: RHPs are Instance Equality Managed, so for the same underlying dependency the same RHP must be returned!
     *
     * @return !null RHP, where its callbacks will be notified when it is complete.
     *
     * @throws UnsupportedOperationException if the SizingApproach is "None"
     */
    public RenderHelperProcess floodAdjustSizeBy( int pRequestedSizeChange )
            throws UnsupportedOperationException;

    /**
     * Request that the "user requested" Size be set to the pRequestedSize.
     * <p/>
     * It will not set the size below the Minimum.
     * <p/>
     * Note: RHPs are Instance Equality Managed, so for the same underlying dependency the same RHP must be returned!
     *
     * @param pRequestedSize - Must be > 0
     *
     * @return !null RHP, where its callbacks will be notified when it is complete.
     *
     * @throws IllegalArgumentException      if pRequestedSize <= 0
     * @throws UnsupportedOperationException if the SizingApproach is "None"
     */
    public RenderHelperProcess setSize( int pRequestedSize )
            throws IllegalArgumentException, UnsupportedOperationException;

    /**
     * Request that the "user requested" Size be adjusted by pRequestedSizeChange.
     * <p/>
     * It will not set the size below the Minimum.
     * <p/>
     * Note: RHPs are Instance Equality Managed, so for the same underlying dependency the same RHP must be returned!
     *
     * @return !null RHP, where its callbacks will be notified when it is complete.
     *
     * @throws UnsupportedOperationException if the SizingApproach is "None"
     */
    public RenderHelperProcess adjustSizeBy( int pRequestedSizeChange )
            throws UnsupportedOperationException;

    /**
     * Get the "Natural" Size - the size something was when it first was Rendered.
     *
     * @return null means that is not "yet" available.
     */
    public Integer getNaturalSize();

    /**
     * Get the "Natural" Size RHP.
     * <p/>
     * Note: RHPs are Instance Equality Managed, so for the same underlying dependency the same RHP must be returned!
     *
     * @return !null RHP, where its callbacks will be notified when it is complete.
     */
    public RenderHelperProcess unavailableNaturalSizeRHP();

    /**
     * Get the "Current" Size.
     * <p/>
     * Renderable Objects that are not Sizable will return their "Natural" Size.
     *
     * @return null means that is not "yet" available.
     */
    public Integer getCurrentSize();

    /**
     * Get the "Current" Size RHP.
     * <p/>
     * Note: RHPs are Instance Equality Managed, so for the same underlying dependency the same RHP must be returned!
     *
     * @return !null RHP, where its callbacks will be notified when it is complete.
     */
    public RenderHelperProcess unavailableCurrentSizeRHP();

    /**
     * Get the "Minimum" Size.
     * <p/>
     * Renderable Objects that are not Sizable will return their "Natural" Size.
     *
     * @return null means that is not "yet" available.
     */
    public Integer getMinimumSize();

    /**
     * Get the "Minimum" Size RHP.
     * <p/>
     * Note: RHPs are Instance Equality Managed, so for the same underlying dependency the same RHP must be returned!
     *
     * @return !null RHP, where its callbacks will be notified when it is complete.
     */
    public RenderHelperProcess unavailableMinimumSizeRHP();
}

Commits for litesoft/trunk/Java/core/Anywhere/src/org/litesoft/render/RenderHelper.java

Diff revisions: vs.
Revision Author Commited Message
2 GeorgeS picture GeorgeS Sun 07 Feb, 2010 12:50:58 +0000