JViewport

Extends
JComponent
Methods
9
Fields
1

Getting one

JViewport.new()
JScrollPane.new():getViewport()

Methods

MethodReturnsDescription
getView()Component?The view, or nil.
setView(Component?)()Makes view the view (the old one is removed).
getViewPosition()PointWhere the view's top-left shows, in view coordinates.
setViewPosition(Point)()Scrolls the view so p shows at the top-left.
getExtentSize()DimensionThe visible part's size.
getViewRect()RectangleThe visible part of the view, in view coordinates.
new()JViewportA viewport with no view.
init(JViewport)()A viewport with no view.
isInstance(any)booleanWhether obj is a JViewport object, a class(JViewport) subclass's included.

Fields

FieldTypeDescription
superJComponentClassJComponent's class table: the base class.

Returned by

MethodReturnsDescription
JScrollPane.getViewportJViewport?The viewport (its child 0).
JViewportClass.newJViewportA viewport with no view.

Method details

isInstance

isInstance: (any) -> boolean

Whether obj is a JViewport object, a class(JViewport) subclass's included.