本文整理汇总了Java中ca.sqlpower.sql.DatabaseListChangeListener类的典型用法代码示例。如果您正苦于以下问题:Java DatabaseListChangeListener类的具体用法?Java DatabaseListChangeListener怎么用?Java DatabaseListChangeListener使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
DatabaseListChangeListener类属于ca.sqlpower.sql包,在下文中一共展示了DatabaseListChangeListener类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: fireAddEvent
import ca.sqlpower.sql.DatabaseListChangeListener; //导入依赖的package包/类
private void fireAddEvent(SPDataSource dbcs) {
logger.debug("firing databaseAddedEvent :");
int index = dataSources.size()-1;
final DatabaseListChangeEvent e = new DatabaseListChangeEvent(this, index, dbcs);
synchronized(listeners) {
Runnable runner = new Runnable() {
public void run() {
for(DatabaseListChangeListener listener : listeners) {
logger.debug("\n"+ listener.toString());
listener.databaseAdded(e);
}
}
};
runInForeground(runner);
}
}
示例2: fireRemoveEvent
import ca.sqlpower.sql.DatabaseListChangeListener; //导入依赖的package包/类
private void fireRemoveEvent(int i, SPDataSource dbcs) {
logger.debug("firing databaseRemovedEvent:");
final DatabaseListChangeEvent e = new DatabaseListChangeEvent(this, i, dbcs);
synchronized(listeners) {
Runnable runner = new Runnable() {
public void run() {
for(DatabaseListChangeListener listener : listeners) {
logger.debug("\n"+ listener.toString());
listener.databaseRemoved(e);
}
}
};
runInForeground(runner);
}
}
示例3: addDatabaseListChangeListener
import ca.sqlpower.sql.DatabaseListChangeListener; //导入依赖的package包/类
public void addDatabaseListChangeListener(DatabaseListChangeListener l) {
dbListChangeListeners.add(l);
}
示例4: removeDatabaseListChangeListener
import ca.sqlpower.sql.DatabaseListChangeListener; //导入依赖的package包/类
public void removeDatabaseListChangeListener(DatabaseListChangeListener l) {
dbListChangeListeners.remove(l);
}
示例5: WabitWorkspace
import ca.sqlpower.sql.DatabaseListChangeListener; //导入依赖的package包/类
/**
* Creates a new Wabit workspace. This is normally done by the session it
* belongs to.
*/
public WabitWorkspace() {
listeners = new ArrayList<DatabaseListChangeListener>();
this.variableResolver = new WorkspaceVariableResolver(this, this.getUUID(), "Workspace - " + this.getName());
setName(DEFAULT_NAME);
}
示例6: addDatabaseListChangeListener
import ca.sqlpower.sql.DatabaseListChangeListener; //导入依赖的package包/类
public void addDatabaseListChangeListener(DatabaseListChangeListener l) {
synchronized(listeners) {
logger.debug("added DatabaseListChangeListener :"+ l.toString());
listeners.add(l);
}
}
示例7: removeDatabaseListChangeListener
import ca.sqlpower.sql.DatabaseListChangeListener; //导入依赖的package包/类
public void removeDatabaseListChangeListener(DatabaseListChangeListener l) {
synchronized(listeners) {
listeners.remove(l);
}
}