01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: */
17: /**
18: * @author Dmitry A. Durnev, Pavel Dolgov
19: * @version $Revision$
20: */package org.apache.harmony.awt.state;
21:
22: import java.awt.Adjustable;
23: import java.awt.ComponentOrientation;
24: import java.awt.Point;
25: import java.awt.Rectangle;
26:
27: /**
28: * ScrollbarState
29: */
30: public interface ScrollbarState extends State {
31: static final int DECREASE_HIGHLIGHT = 1;
32: static final int INCREASE_HIGHLIGHT = 2;
33: static final int NO_HIGHLIGHT = 0;
34:
35: Adjustable getAdjustable();
36:
37: int getHighlight();
38:
39: ComponentOrientation getComponentOrientation();
40:
41: Point getLocation(); //location of scrollbar inside component
42:
43: boolean isDecreasePressed(); // left/top arrow
44:
45: boolean isIncreasePressed(); // right/bottom arrow
46:
47: boolean isSliderPressed();
48:
49: int getSliderPosition();
50:
51: int getSliderSize();
52:
53: int getScrollSize();
54:
55: boolean isVertical();
56:
57: // getters/setters for coordinates in pixels:
58: Rectangle getSliderRect();
59:
60: Rectangle getIncreaseRect();
61:
62: Rectangle getDecreaseRect();
63:
64: Rectangle getTrackBounds();
65:
66: Rectangle getUpperTrackBounds();
67:
68: Rectangle getLowerTrackBounds();
69:
70: int getTrackSize();
71:
72: void setSliderRect(Rectangle r);
73:
74: void setIncreaseRect(Rectangle r);
75:
76: void setDecreaseRect(Rectangle r);
77:
78: void setTrackBounds(Rectangle r);
79:
80: void setUpperTrackBounds(Rectangle r);
81:
82: void setLowerTrackBounds(Rectangle r);
83:
84: void setTrackSize(int size);
85:
86: // set typed value(necessary for scrollpane)
87: void setValue(int type, int value);
88:
89: }
|