Blame |
Last modification |
View Log
| RSS feed
package rene.gui;
import java.awt.Choice;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
{ DoActionListener C;
public ChoiceTranslator
{ C=c; S=s; Ch=ch;
}
{ C.
itemAction(S,e.
getStateChange()==
ItemEvent.
SELECTED);
}
}
/**
This is a choice item, which sets a specified font and translates
events into strings, which are passed to the doAction method of the
DoActionListener.
@see jagoclient.gui.CloseFrame#doAction
@see jagoclient.gui.CloseDialog#doAction
*/
public class ChoiceAction
extends Choice
{ public ChoiceAction
(DoActionListener c,
String s
)
{ addItemListener(new ChoiceTranslator(this,c,s));
if (Global.NormalFont!=null) setFont(Global.NormalFont);
if (Global.Background!=null) setBackground(Global.Background);
}
}