Package org.gjt.sp.jedit.textarea
Class ScrollLayout
- java.lang.Object
-
- org.gjt.sp.jedit.textarea.ScrollLayout
-
- All Implemented Interfaces:
java.awt.LayoutManager
public class ScrollLayout extends java.lang.Object implements java.awt.LayoutManager
Similar to a javax.swing.ScrollPaneLayout, but not as restrictive on the components that can be added. This layout is essentially a 3 x 3 grid layout, with the intent that the bottom and right will hold scroll bars. When installed a TextArea, the bottom has a scroll bar, the right has a vertical box containing a scroll bar, the left has a Gutter, and the center holds a TextAreaPainter. The corners and top are not used by the TextArea. The corners are intended to be a place to put a button or other small component. The corner dimensions are constrained by the left, right, top, and bottom components, so, for example, the width of the top left corner is the width of the left component and the height of the top left corner is the height of the top component.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
BOTTOM
static java.lang.String
BOTTOM_LEFT
static java.lang.String
BOTTOM_RIGHT
static java.lang.String
CENTER
static java.lang.String
LEFT
static java.lang.String
RIGHT
static java.lang.String
TOP
static java.lang.String
TOP_LEFT
static java.lang.String
TOP_RIGHT
-
Constructor Summary
Constructors Constructor Description ScrollLayout()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addLayoutComponent(java.lang.String name, java.awt.Component comp)
Adds a component to the layout using thename
parameter to position the component.void
layoutContainer(java.awt.Container parent)
java.awt.Dimension
minimumLayoutSize(java.awt.Container parent)
java.awt.Dimension
preferredLayoutSize(java.awt.Container parent)
void
removeLayoutComponent(java.awt.Component comp)
Removes the specified component from the layout.
-
-
-
Field Detail
-
CENTER
public static final java.lang.String CENTER
- See Also:
- Constant Field Values
-
RIGHT
public static final java.lang.String RIGHT
- See Also:
- Constant Field Values
-
LEFT
public static final java.lang.String LEFT
- See Also:
- Constant Field Values
-
BOTTOM
public static final java.lang.String BOTTOM
- See Also:
- Constant Field Values
-
TOP
public static final java.lang.String TOP
- See Also:
- Constant Field Values
-
TOP_LEFT
public static final java.lang.String TOP_LEFT
- See Also:
- Constant Field Values
-
TOP_RIGHT
public static final java.lang.String TOP_RIGHT
- See Also:
- Constant Field Values
-
BOTTOM_LEFT
public static final java.lang.String BOTTOM_LEFT
- See Also:
- Constant Field Values
-
BOTTOM_RIGHT
public static final java.lang.String BOTTOM_RIGHT
- See Also:
- Constant Field Values
-
-
Method Detail
-
addLayoutComponent
public void addLayoutComponent(java.lang.String name, java.awt.Component comp)
Adds a component to the layout using thename
parameter to position the component.- Specified by:
addLayoutComponent
in interfacejava.awt.LayoutManager
- Parameters:
name
- One of CENTER, RIGHT, LEFT, BOTTOM, TOP, TOP_LEFT, TOP_RIGHT, BOTTOM_LEFT, BOTTOM_RIGHT.comp
- The component to add at the given position. Ifnull
, the component will be removed from that position.
-
removeLayoutComponent
public void removeLayoutComponent(java.awt.Component comp)
Removes the specified component from the layout.- Specified by:
removeLayoutComponent
in interfacejava.awt.LayoutManager
- Parameters:
comp
- The component to be removed.
-
preferredLayoutSize
public java.awt.Dimension preferredLayoutSize(java.awt.Container parent)
- Specified by:
preferredLayoutSize
in interfacejava.awt.LayoutManager
-
minimumLayoutSize
public java.awt.Dimension minimumLayoutSize(java.awt.Container parent)
- Specified by:
minimumLayoutSize
in interfacejava.awt.LayoutManager
-
layoutContainer
public void layoutContainer(java.awt.Container parent)
- Specified by:
layoutContainer
in interfacejava.awt.LayoutManager
-
-