java.lang.Object
org.gjt.sp.jedit.textarea.ScrollLayout
- All Implemented Interfaces:
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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addLayoutComponent
(String name, Component comp) Adds a component to the layout using thename
parameter to position the component.void
layoutContainer
(Container parent) minimumLayoutSize
(Container parent) preferredLayoutSize
(Container parent) void
Removes the specified component from the layout.
-
Field Details
-
CENTER
- See Also:
-
RIGHT
- See Also:
-
LEFT
- See Also:
-
BOTTOM
- See Also:
-
TOP
- See Also:
-
TOP_LEFT
- See Also:
-
TOP_RIGHT
- See Also:
-
BOTTOM_LEFT
- See Also:
-
BOTTOM_RIGHT
- See Also:
-
-
Constructor Details
-
ScrollLayout
public ScrollLayout()
-
-
Method Details
-
addLayoutComponent
Adds a component to the layout using thename
parameter to position the component.- Specified by:
addLayoutComponent
in interfaceLayoutManager
- 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
Removes the specified component from the layout.- Specified by:
removeLayoutComponent
in interfaceLayoutManager
- Parameters:
comp
- The component to be removed.
-
preferredLayoutSize
- Specified by:
preferredLayoutSize
in interfaceLayoutManager
-
minimumLayoutSize
- Specified by:
minimumLayoutSize
in interfaceLayoutManager
-
layoutContainer
- Specified by:
layoutContainer
in interfaceLayoutManager
-