Class zebkit.ui.Window
extends <zebkit.ui.Panel>

Window UI component class. Implements window like UI component. The window component has a header, status bar and content areas. The header component is usually placed at the top of window, the status bar component is placed at the bottom and the content component at places the central part of the window. Also the window defines corner UI component that is supposed to be used to resize the window. The window implementation provides the following possibilities:

   - Move window by dragging the window on its header
   - Resize window by dragging the window corner element
   - Place buttons in the header to maximize, minimize, close, etc the window
   - Indicates state of window (active or inactive) by changing
   the widow header style
   - Define a window icon component
   - Define a window status bar component
zebkit.ui.Window ([s], [c])


Inherited methods:
$setConstraints(c)    add(constr, d)    byConstraints([p], c)    byPath(path, [cb])    calcPreferredSize(target)    doLayout( )    fire(event, [path], [params])    focused( )    getBottom( )    getCanvas( )    getComponentAt(x, y)    getHorPadding( )    getLeft( )    getPreferredSize( )    getRight( )    getTop( )    getVerPadding( )    hasFocus( )    indexOf(c)    insert(i, constr, d)    invalidate( )    invalidateLayout( )    kidAdded(index, constr, l)    kidRemoved(i, l)    laidout( )    load(JSON)    off([eventName], [path], [cb])    on([eventName], [path], cb)    paintComponent(g)    paintViewAt(g, ax, ay, v)    properties([path], props)    property([path], name, value)    recalc( )    relocated(px, py)    remove(c)    removeAll( )    removeAt(i)    removeByConstraints(ctr)    removeMe([after])    repaint([x], [y], [w], [h])    requestFocus( )    requestFocusIn([timeout])    resized(pw, ph)    setAt(i, d)    setBackground(v)    setBorder([v])    setBottomPadding(bottom)    setBounds(x, y, w, h)    setByConstraints(constr, c)    setConstraints(ctr)    setEnabled(b)    setId(id)    setKids(a)    setLayout(m)    setLeftPadding(left)    setLocation(xx, yy)    setPadding(v)    setParent(o)    setPreferredSize(w, h)    setProperties([path], props)    setRightPadding(right)    setSize(w, h)    setTopPadding(top)    setVisible(b)    toBack( )    toFront( )    toPreferredHeight( )    toPreferredSize( )    toPreferredWidth( )    toView(target)    validate( )    validateMetric( )    vrp( )   

public chainable close ( )

Close the window

protected <zebkit.ui.Panel> createCaptionPan ( )

Create a caption component

Returns: <zebkit.ui.Panel>

a zebkit caption component

protected <zebkit.ui.Panel> createContentPan ( )

Create a content component

Returns: <zebkit.ui.Panel>

a content component

protected <zebkit.ui.Label> createTitle ( )

Create a caption title label

Returns: <zebkit.ui.Label>

a caption title label

protected <Boolean> insideCorner (px, py)

Test if the pointer cursor is inside the window corner component

  • px <Integer>

    a x coordinate of the pointer cursor

  • py <Integer>

    a y coordinate of the pointer cursor

Returns: <Boolean>

true if the pointer cursor is inside window corner component

public <Boolean> isActive ( )

Test if the window is shown as a window and activated

Returns: <Boolean>

true is the window is shown as internal window and is active.

public <Boolean> isMaximized ( )

Test if the window has been maximized to occupy the whole window layer space.

Returns: <Boolean>

true if the window has been maximized

public chainable maximize ( )

Maximize the window

public chainable restore ( )

Restore the window size

public void setButtons (buttons)

Set the window buttons set.

  • buttons <Object>

    dictionary of buttons icons for window buttons. The dictionary key defines a method of the window component to be called when the given button has been pressed. So the method has to be defined in the window component.

public chainable setSizeable (b)

Make the window sizable or not sizeable

  • b <Boolean>

    a sizeable state of the window

Inherited attributes:
public zebkit.draw.View bg    public zebkit.draw.View border    public Boolean canHaveFocus    public Object constraints    public Integer height    public Boolean isEnabled    public Boolean isValid    public Boolean isVisible    public Array kids    public zebkit.layout.Layout layout    public zebkit.layout.Layoutable parent    public Integer width    public Integer x    public Integer y   

public <zebkit.ui.Panel> buttons

Window buttons panel. The panel can contain number of window buttons

public <zebkit.ui.Panel> caption

Window caption panel. The panel contains window icons, button and title label

public <zebkit.ui.Panel> icons

Icons panel. The panel can contain number of icons.

public <Boolean> isSizeable

Indicate if the window can be resized by dragging its by corner

public <Integer> minSize

Minimal possible size of the window

public <zebkit.ui.Panel> root

Root window panel. The root panel has to be used to add any UI components

public <zebkit.ui.Panel> status

Window status panel.

public <zebkit.ui.Panel> title

Window title component