Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Source code: jcurses/widgets/IScrollable.java


1   package jcurses.widgets;
2   
3   import jcurses.util.Rectangle;
4   import jcurses.system.CharColor;
5   
6   
7   /**
8   *  This interface is to be implemented by widgets, that use
9   *  <code>ScrollbarPainter</code> to paint vertical or horizontal
10  *  (or both ) scrollbars. Througth this interface the widget gives
11  *  to the <code>ScrollbarPainter</code> needed data to paint or refresh 
12  *  scrollbars; 
13  */
14  
15  
16  public interface IScrollable {
17    
18    /**
19    * This method returns true, if the using widget has a horizontal scrollbar,
20    * ( independent of the size of it, this can be also empty)
21    * 
22    * @return true, if the scrollbar is to be paint, false otherwise
23    */
24    
25    public boolean hasHorizontalScrollbar();
26    
27    /**
28    * This method returns true, if the using widget has a vertical scrollbar,
29    * ( independent of the size of it, this can be also empty)
30    *
31    * @return true, if the scrollbar is to be paint, false otherwise
32    */
33  
34    public boolean hasVerticalScrollbar();
35    
36    
37    /**
38    *  The method returns the rectangle of the border, on which scrollbars are to be paint 
39    *
40    * @return rectangle of the border
41    */
42    public Rectangle getBorderRectangle();
43    
44    /**
45    * The method returns colors, with which the border is to be paint
46    *
47    * @return border colors
48    */
49    
50    public CharColor getBorderColors();
51    
52    /**
53    * The method returns colors, with which scrollbars are to be paint
54    *
55    * @return scrollbar colors 
56    */
57    
58    public CharColor getScrollbarColors();
59    
60    
61    
62    /**
63    *  The method returns the offset of the horizontal scrollbar as part of the length of the 
64    *  side of the border rectangle ( 0 <=value < 1.0 )
65    * 
66    * @return horizontal scrollbar offset
67    */
68    public float getHorizontalScrollbarOffset();
69    
70    /**
71    *  The method returns the length of the horizontal scrollbar as part of the length of the 
72    *  side of the border rectangle ( 0 < value <= 1.0 )
73    * 
74    * @return vertical scrollbar o
75    */
76    public float getHorizontalScrollbarLength();
77    
78    /**
79    *  The method returns the offset of the vertical scrollbar as part of the length of the 
80    *  side of the border rectangle ( 0 < =value < 1.0 )
81    */
82    public float getVerticalScrollbarOffset();
83    
84    /**
85    *  The method returns the length of the vertical scrollbar as part of the length of the 
86    *  side of the border rectangle ( 0 <value <= 1.0 )
87    */
88    public float getVerticalScrollbarLength();
89    
90    
91    
92    
93    
94  }