ca.sqlpower.wabit.swingui.report
Class DraggableWabitObjectListModel

java.lang.Object
  extended by ca.sqlpower.wabit.swingui.report.DraggableWabitObjectListModel
All Implemented Interfaces:
javax.swing.ListModel

public class DraggableWabitObjectListModel
extends java.lang.Object
implements javax.swing.ListModel

This query list model will contain a list of all the queries in the workspace. This is for dragging in queries, images, charts, and so on to a layout.

Takes a snapshot of the eligible workspace items when it's constructed. This behaviour replaces a previous version which tried to be dynamic, but didn't watch the session for changes (and never fired a ListDataEvent). In practice, we make one of these every time we show an editor, so the fact that it doesn't update is not (currently) a problem. If that changes, we can make this fancier.


Constructor Summary
DraggableWabitObjectListModel(WabitWorkspace workspace)
           
 
Method Summary
 void addListDataListener(javax.swing.event.ListDataListener l)
           
 java.lang.Object getElementAt(int index)
           
 int getSize()
           
 void removeListDataListener(javax.swing.event.ListDataListener l)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DraggableWabitObjectListModel

public DraggableWabitObjectListModel(WabitWorkspace workspace)
Method Detail

addListDataListener

public void addListDataListener(javax.swing.event.ListDataListener l)
Specified by:
addListDataListener in interface javax.swing.ListModel

removeListDataListener

public void removeListDataListener(javax.swing.event.ListDataListener l)
Specified by:
removeListDataListener in interface javax.swing.ListModel

getElementAt

public java.lang.Object getElementAt(int index)
Specified by:
getElementAt in interface javax.swing.ListModel

getSize

public int getSize()
Specified by:
getSize in interface javax.swing.ListModel


Copyright © 2009. All Rights Reserved.