本文整理汇总了Java中weka.gui.scripting.event.TitleUpdatedEvent类的典型用法代码示例。如果您正苦于以下问题:Java TitleUpdatedEvent类的具体用法?Java TitleUpdatedEvent怎么用?Java TitleUpdatedEvent使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
TitleUpdatedEvent类属于weka.gui.scripting.event包,在下文中一共展示了TitleUpdatedEvent类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: titleUpdated
import weka.gui.scripting.event.TitleUpdatedEvent; //导入依赖的package包/类
/**
* Gets called when the title of the frame/dialog needs updating.
*
* @param event the event that got sent
*/
public void titleUpdated(TitleUpdatedEvent event) {
if (PropertyDialog.getParentDialog(ScriptingPanel.this) != null)
PropertyDialog.getParentDialog(ScriptingPanel.this).setTitle(getTitle());
else if (PropertyDialog.getParentFrame(ScriptingPanel.this) != null)
PropertyDialog.getParentFrame(ScriptingPanel.this).setTitle(getTitle());
}
示例2: actionPerformed
import weka.gui.scripting.event.TitleUpdatedEvent; //导入依赖的package包/类
/**
* Fired when action got executed.
*
* @param e the event
*/
public void actionPerformed(ActionEvent e) {
boolean ok;
int retVal;
if (!checkModified())
return;
retVal = m_FileChooser.showOpenDialog(FileScriptingPanel.this);
if (retVal != JFileChooser.APPROVE_OPTION)
return;
ok = m_Script.open(m_FileChooser.getSelectedFile());
m_TextCode.setCaretPosition(0);
if (!ok)
JOptionPane.showMessageDialog(
FileScriptingPanel.this,
"Couldn't open file '" + m_FileChooser.getSelectedFile() + "'!");
notifyTitleUpdatedListeners(new TitleUpdatedEvent(FileScriptingPanel.this));
}
示例3: notifyTitleUpdatedListeners
import weka.gui.scripting.event.TitleUpdatedEvent; //导入依赖的package包/类
/**
* Sends the event to all listeners for title updates.
*
* @param e the event to send
*/
protected void notifyTitleUpdatedListeners(TitleUpdatedEvent e) {
Iterator<TitleUpdatedListener> iter;
iter = m_TitleUpdatedListeners.iterator();
while (iter.hasNext())
iter.next().titleUpdated(e);
}