ch.uzh.ifi.attempto.preditor.example
Class ExampleMenuCreator

java.lang.Object
  extended by ch.uzh.ifi.attempto.preditor.MenuCreator
      extended by ch.uzh.ifi.attempto.preditor.example.ExampleMenuCreator

public class ExampleMenuCreator
extends MenuCreator

This class is an examplary implementation of a menu creator. See the source code.

Author:
Tobias Kuhn

Constructor Summary
ExampleMenuCreator()
          Creates a new menu creator instance.
 
Method Summary
 void initMenuCreation()
          This abstract method is called when the predictive editor is refreshed (before the first call of processCategory).
 void processCategory(Terminal category)
          An implementation of this abstract method should process the category by calling addMenuItem and/or addMenuEntry.
 
Methods inherited from class ch.uzh.ifi.attempto.preditor.MenuCreator
addMenuEntry, addMenuEntry, addMenuItem, addReferenceEntries, addVariableEntries, getAccessibleTextElements, prepareMenuBlock, prepareMenuBlock
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExampleMenuCreator

public ExampleMenuCreator()
Creates a new menu creator instance.

Method Detail

initMenuCreation

public void initMenuCreation()
Description copied from class: MenuCreator
This abstract method is called when the predictive editor is refreshed (before the first call of processCategory). This is a good place for calling prepareMenuBlock.

Specified by:
initMenuCreation in class MenuCreator

processCategory

public void processCategory(Terminal category)
Description copied from class: MenuCreator
An implementation of this abstract method should process the category by calling addMenuItem and/or addMenuEntry.

Specified by:
processCategory in class MenuCreator
Parameters:
category - The category of the grammar to be processed.


Copyright 2008-2009, Attempto Group, University of Zurich (see http://attempto.ifi.uzh.ch)