|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectedu.washington.cs.supple.render.AbstractRenderedView
edu.washington.cs.supple.wlib.java2.SwingView
| Field Summary | |
protected boolean |
allowExpand
Expand the available size if ui can't be solved. |
protected java.awt.Dimension |
availableSize
How much space is available to display ui |
protected java.awt.Container |
container
Ui container. |
protected Solution |
currentSolution
|
protected boolean |
freeze
If false, re-render ui on parent window resize. |
protected java.util.List |
listeners
Listeners |
protected java.awt.Dimension |
maxAvailableSize
How much space can be used if available space is not enough. |
protected java.awt.Dimension |
minAvailableSize
How much space should be used if container is too small. |
protected boolean |
rendering
|
protected java.awt.Dimension |
solutionSize
Current solution size. |
protected Solver |
solverOverride
|
protected WidgetFactory |
widgetFactory
|
protected java.awt.Window |
window
Window created to view ui (may be null - meaning container was provided). |
| Constructor Summary | |
SwingView(SwingRenderer renderer,
SwingView parent,
UiObject object,
java.awt.Container container)
Construct a Swing view. |
|
| Method Summary | |
void |
addSwingViewListener(SwingViewListener l)
Add a listener. |
protected void |
availableScreenSizeChanged(java.awt.Dimension newSize)
|
protected javax.swing.JMenuBar |
buildMenuBar()
Create a menu bar for the SwingView window (if any). |
boolean |
dismiss()
Dismisses the view |
protected void |
displaySolution(Solution soln)
Called when solutions are made available. |
protected void |
ensureContainer()
Make sure the ui container exists |
protected void |
ensureMinimumAvailableSize()
Make sure available size is greater than or equal to the minimum available size. |
boolean |
expand(double horizontal,
double vertical)
Expand availableSize along given dimen |
boolean |
getAllowExpand()
|
boolean |
getFreeze()
|
java.awt.Dimension |
getMaxAvailableSize()
|
java.awt.Dimension |
getMinAvailableSize()
|
Solver |
getSolverOverride()
|
WidgetFactory |
getWidgetFactory()
Returns the widget factory override set for this view |
protected java.awt.Window |
getWindow()
Get the contained window (if it exists). |
boolean |
isVisible()
|
void |
removeSwingViewListener(SwingViewListener l)
Remove a listener. |
protected void |
render()
Override to implement rendering |
void |
rerender()
Re-render the ui, possibly adapting the frame size. |
void |
setAllowExpand(boolean value,
java.awt.Dimension maxSize)
|
void |
setFreeze(boolean value)
Change the value of freeze. |
void |
setMinAvailableSize(java.awt.Dimension minSize)
|
void |
setSolverOverride(Solver solverOverride)
|
void |
setWidgetFactory(WidgetFactory factory)
Allows you to override the default widget factory used on this device |
void |
solutionAvailable(Solution solution)
This method is called when the search comes up with an improvement to the interface -- allows the listener to use the partial results |
| Methods inherited from class edu.washington.cs.supple.render.AbstractRenderedView |
closed, getParentView, getRenderer, getUiObject, show |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected java.awt.Dimension availableSize
protected java.awt.Dimension solutionSize
protected boolean allowExpand
protected java.awt.Dimension minAvailableSize
protected java.awt.Dimension maxAvailableSize
protected boolean freeze
protected java.awt.Window window
protected java.awt.Container container
protected java.util.List listeners
protected Solver solverOverride
protected WidgetFactory widgetFactory
protected volatile boolean rendering
protected Solution currentSolution
| Constructor Detail |
public SwingView(SwingRenderer renderer,
SwingView parent,
UiObject object,
java.awt.Container container)
| Method Detail |
public boolean dismiss()
RenderedView
dismiss in interface RenderedViewdismiss in class AbstractRenderedViewpublic boolean isVisible()
protected java.awt.Window getWindow()
protected void render()
AbstractRenderedView
render in class AbstractRenderedView
public boolean expand(double horizontal,
double vertical)
public void rerender()
public void solutionAvailable(Solution solution)
SolverListener
solutionAvailable in interface SolverListenerprotected void displaySolution(Solution soln)
protected void ensureContainer()
protected void ensureMinimumAvailableSize()
protected javax.swing.JMenuBar buildMenuBar()
protected void availableScreenSizeChanged(java.awt.Dimension newSize)
public WidgetFactory getWidgetFactory()
public void setWidgetFactory(WidgetFactory factory)
factory - a widget factory overridepublic Solver getSolverOverride()
public void setSolverOverride(Solver solverOverride)
solverOverride - The solverOverride to set.public boolean getFreeze()
public void setFreeze(boolean value)
value - The value to set.public java.awt.Dimension getMinAvailableSize()
public void setMinAvailableSize(java.awt.Dimension minSize)
minSize - public boolean getAllowExpand()
public java.awt.Dimension getMaxAvailableSize()
public void setAllowExpand(boolean value,
java.awt.Dimension maxSize)
value - maxSize - public void addSwingViewListener(SwingViewListener l)
l - public void removeSwingViewListener(SwingViewListener l)
l -
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||