com.leafdigital.ui.api
Interface DecoratedPanel

All Superinterfaces:
Panel, Widget, WidgetParent

public interface DecoratedPanel
extends Panel

Provides visual decoration as a background to other components.


Method Summary
 void repaint()
          Causes the panel to repaint itself.
 void setOnPaint(java.lang.String callback)
          Sets a callback used to paint the decoration.
 void setPadding(int top, int right, int bottom, int left)
          Sets padding that applies around the inner component for decoration.
 
Methods inherited from interface com.leafdigital.ui.api.Panel
remove, removeAll, setBorder
 
Methods inherited from interface com.leafdigital.ui.api.Widget
getID, getOwner, informClosed, isVisible, setOwner, setVisible
 
Methods inherited from interface com.leafdigital.ui.api.WidgetParent
getWidgets
 

Method Detail

setPadding

void setPadding(int top,
                int right,
                int bottom,
                int left)
Sets padding that applies around the inner component for decoration.

Parameters:
top - Top inset (px)
right - Right inset (px)
bottom - Bottom inset (px)
left - Left inset (px)

setOnPaint

@UICallback
void setOnPaint(java.lang.String callback)
Sets a callback used to paint the decoration. The callback must have the signature public void callback(Graphics2D g,int left,int top,int width,int height).

Parameters:
callback - Callback method or null for none

repaint

void repaint()
Causes the panel to repaint itself.



Copyright © 2011 Samuel Marshall. All rights reserved.