org.nuiton.log
Class MonitorMapper
java.lang.Object
org.nuiton.log.MonitorMapper
- All Implemented Interfaces:
- ActionListener, EventListener, LutinLogListener
public class MonitorMapper
- extends Object
- implements LutinLogListener, ActionListener
Helper to monitor LutinLog. This class permit to say which component used
to display text, which component used to display progress and what is the
cancel button
- Author:
- poussin
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
lutinLog
protected LutinLog lutinLog
parentContainer
protected Container parentContainer
label
protected Component label
progress
protected JProgressBar progress
cancel
protected Component cancel
changeCancelText
protected boolean changeCancelText
MonitorMapper
public MonitorMapper(LutinLog lutinLog,
Container parentContainer,
Component label,
JProgressBar progress,
Component cancel,
boolean changeCancelText)
- Parameters:
lutinLog - LutinLog to monitorparentContainer - component that contains all other component
if not null, then when task begin setVisible(true) is called
and when task end setVisible(false) is calledlabel - component that have setText method to display user log
(JLabel, JTextField, ...)progress - progress widgetcancel - componant that have addActionListener
(JButton,Button, ...)changeCancelText - if true try to change text display in cancel
component switch between "Cancel" and "Don't cancel"
addActionListener
protected void addActionListener(Component c,
ActionListener action)
- Try to call addActionListener on component, do nothing if call failed
- Parameters:
c - action -
setText
protected void setText(Component c,
String text)
- try to call setText on component, do nothing if call failed
- Parameters:
c - text - text to put in component
logEvent
public void logEvent(LutinLogEvent e)
- Specified by:
logEvent in interface LutinLogListener
progressEvent
public void progressEvent(LutinProgressEvent e)
- Specified by:
progressEvent in interface LutinLogListener
actionPerformed
public void actionPerformed(ActionEvent e)
- Specified by:
actionPerformed in interface ActionListener
Copyright © 2004-2010 CodeLutin. All Rights Reserved.