rero.gui
Class UICapabilities

java.lang.Object
  extended byrero.gui.UICapabilities

public class UICapabilities
extends Object


Field Summary
protected  IRCSession clientSession
           
protected  WindowDataListener listeners
           
protected  BuiltInLogger logger
           
 
Constructor Summary
UICapabilities(IRCSession _session)
           
 
Method Summary
 void clearScreen(String window)
           
 void closeWindow(String window)
           
 String getQuery()
           
 boolean isActive(String title)
           
 boolean isWindow(String title)
           
 void logMessage(String window, String text)
           
 void notifyActiveWindow()
           
 void notifyWindow(String window)
           
 void openChannelWindow(Channel channel)
           
 void openDCCWindow()
           
 void openListWindow()
           
 void openQueryWindow(String nickname, boolean selected)
           
 void printActive(String text)
          prints text to the active window, if no window is active text is printed to the status window
 void printAll(String text)
          prints text to all open windows for the current server.
 void printChunk(String window, String normal, String[] chunks, double percentage)
          prints a chunk of text to the specified window, a special case used for /names formatting
 void printNormal(String window, String text)
          prints text to the specified window.
 void printRaw(String window, String text)
           
 void printStatus(String text)
          prints text directly to the status window.
 void printToTargets(Set targets, String text, boolean alwaysStatus)
          prints a message to the window for each target (if it exists), if there is no window for any of the targets output goes to the status window, if any of the targets are handled in the status window the text is echo'd at most once to the status window
 void renameWindow(String old, String newtitle)
           
 void setListener(WindowDataListener l)
           
 void setQuery(String query)
           
protected  boolean shouldContinue(String window, String text)
          checks the listeners to make sure text is approved by on window events, also makes sure text is not null
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

clientSession

protected IRCSession clientSession

listeners

protected WindowDataListener listeners

logger

protected BuiltInLogger logger
Constructor Detail

UICapabilities

public UICapabilities(IRCSession _session)
Method Detail

logMessage

public void logMessage(String window,
                       String text)

setQuery

public void setQuery(String query)

getQuery

public String getQuery()

isActive

public boolean isActive(String title)

isWindow

public boolean isWindow(String title)

shouldContinue

protected boolean shouldContinue(String window,
                                 String text)
checks the listeners to make sure text is approved by on window events, also makes sure text is not null


printActive

public void printActive(String text)
prints text to the active window, if no window is active text is printed to the status window


printAll

public void printAll(String text)
prints text to all open windows for the current server. By all I mean *all* open windows. Window buttons are not flagged.


printStatus

public void printStatus(String text)
prints text directly to the status window.


printNormal

public void printNormal(String window,
                        String text)
prints text to the specified window. If the window doesn't exist the text goes to the status window, simple enough


printToTargets

public void printToTargets(Set targets,
                           String text,
                           boolean alwaysStatus)
prints a message to the window for each target (if it exists), if there is no window for any of the targets output goes to the status window, if any of the targets are handled in the status window the text is echo'd at most once to the status window


printChunk

public void printChunk(String window,
                       String normal,
                       String[] chunks,
                       double percentage)
prints a chunk of text to the specified window, a special case used for /names formatting


printRaw

public void printRaw(String window,
                     String text)

clearScreen

public void clearScreen(String window)

openQueryWindow

public void openQueryWindow(String nickname,
                            boolean selected)

closeWindow

public void closeWindow(String window)

openListWindow

public void openListWindow()

openDCCWindow

public void openDCCWindow()

openChannelWindow

public void openChannelWindow(Channel channel)

notifyActiveWindow

public void notifyActiveWindow()

notifyWindow

public void notifyWindow(String window)

renameWindow

public void renameWindow(String old,
                         String newtitle)

setListener

public void setListener(WindowDataListener l)