org.qriterium.dogma.gui
Class DogmaListeners

java.lang.Object
  extended by org.qriterium.dogma.gui.DogmaListeners

public class DogmaListeners
extends java.lang.Object


Constructor Summary
DogmaListeners()
           
 
Method Summary
static void addTagsToResources(DogmaResourceTable model, DogmaTable table, DogmaDBCommComponent dbcomm)
          Opens query dialog for adding tags to selected resources.
static void copyResources(DogmaResourceTable model, DogmaTable table)
          Copies currently selected resources to the clipboard.
static void openNewFormView(DogmaDBCommComponent dbc)
          Opens empty DogmaFormView for adding a new resource.
static void openResourceInFormView(DogmaDBCommComponent dbc, DogmaResourceTable model, int row)
          Opens currently selected resource in DogmaFormView.
static void openResourcesInGraph(ResourceBase rb, DogmaResourceTable model, DogmaTable table)
          Open selected resources in Guess
static void openResourcesInNewBrowser(DogmaResourceTable model, DogmaTable table)
          Opens selected resources in new resourcebrowser.
static void pasteResources(DogmaResourceTable model, DogmaResourceTableComponent parent)
          Pastes resources currently on clipboard to the target resourcetable.
static org.eclipse.swt.widgets.Menu resourcePopUpMenu(DogmaTable table, DogmaMain core, DogmaResourceTable model, DogmaResourceTableComponent parent, DogmaDBCommComponent database, int col, int row)
          Creates pop-up menu UI for the resource table and adds listeners to it.
static void selectAllResources(DogmaResourceTable model, DogmaTable table)
          Selects all resources from the target resourcetable.
static org.eclipse.swt.widgets.Menu uriHeaderMenu(de.kupzog.ktable.KTable table, DogmaURITable model, int col)
          uriHeaderMenu is a menu that is intended to be created when user right-clicks on a URI-table header, but it can also be used in other implementations.
static org.eclipse.swt.widgets.Menu uriMenu(DogmaTable table, DogmaURITable model, org.eclipse.swt.graphics.Point location, org.eclipse.swt.graphics.Point visibleLocation, boolean onRow)
          uriMenu is a menu that is intended to be created when user right-clicks on a URI-table cell, but it can also be used in other implementations.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DogmaListeners

public DogmaListeners()
Method Detail

resourcePopUpMenu

public static org.eclipse.swt.widgets.Menu resourcePopUpMenu(DogmaTable table,
                                                             DogmaMain core,
                                                             DogmaResourceTable model,
                                                             DogmaResourceTableComponent parent,
                                                             DogmaDBCommComponent database,
                                                             int col,
                                                             int row)
Creates pop-up menu UI for the resource table and adds listeners to it.

Returns:
pop-up menu UI

selectAllResources

public static void selectAllResources(DogmaResourceTable model,
                                      DogmaTable table)
Selects all resources from the target resourcetable.


openResourceInFormView

public static void openResourceInFormView(DogmaDBCommComponent dbc,
                                          DogmaResourceTable model,
                                          int row)
Opens currently selected resource in DogmaFormView.

Parameters:
model -
row -

copyResources

public static void copyResources(DogmaResourceTable model,
                                 DogmaTable table)
Copies currently selected resources to the clipboard.

Parameters:
model -
table -

pasteResources

public static void pasteResources(DogmaResourceTable model,
                                  DogmaResourceTableComponent parent)
Pastes resources currently on clipboard to the target resourcetable.

Parameters:
model -
parent -

openResourcesInGraph

public static void openResourcesInGraph(ResourceBase rb,
                                        DogmaResourceTable model,
                                        DogmaTable table)
Open selected resources in Guess

Parameters:
model -
table -

openNewFormView

public static void openNewFormView(DogmaDBCommComponent dbc)
Opens empty DogmaFormView for adding a new resource.


openResourcesInNewBrowser

public static void openResourcesInNewBrowser(DogmaResourceTable model,
                                             DogmaTable table)
Opens selected resources in new resourcebrowser.

Parameters:
model -
table -

addTagsToResources

public static void addTagsToResources(DogmaResourceTable model,
                                      DogmaTable table,
                                      DogmaDBCommComponent dbcomm)
Opens query dialog for adding tags to selected resources.

Parameters:
model -
table -

uriHeaderMenu

public static org.eclipse.swt.widgets.Menu uriHeaderMenu(de.kupzog.ktable.KTable table,
                                                         DogmaURITable model,
                                                         int col)
uriHeaderMenu is a menu that is intended to be created when user right-clicks on a URI-table header, but it can also be used in other implementations. Currently implemented options: HIDE: sets the width of the selected column to zero and hides it.

Parameters:
table -
model -
cellX -
cellY -
Returns:

uriMenu

public static org.eclipse.swt.widgets.Menu uriMenu(DogmaTable table,
                                                   DogmaURITable model,
                                                   org.eclipse.swt.graphics.Point location,
                                                   org.eclipse.swt.graphics.Point visibleLocation,
                                                   boolean onRow)
uriMenu is a menu that is intended to be created when user right-clicks on a URI-table cell, but it can also be used in other implementations. Currently implemented options: OPEN: opens the uri in the default program (uses DogmaOpen) ADD: adds a new row to the table EDIT: edits the value in the selected cell DELETE: deletes the selected row

Parameters:
table -
model -
cellX -
cellY -
Returns: