Example usage for org.apache.commons.lang3.event EventListenerSupport EventListenerSupport

List of usage examples for org.apache.commons.lang3.event EventListenerSupport EventListenerSupport

Introduction

In this page you can find the example usage for org.apache.commons.lang3.event EventListenerSupport EventListenerSupport.

Prototype

public EventListenerSupport(final Class<L> listenerInterface) 

Source Link

Document

Creates an EventListenerSupport object which supports the provided listener interface.

Usage

From source file:com.anrisoftware.prefdialog.miscswing.docks.dockingframes.dock.AbstractEditorDockWindow.java

public final Object readResolve() {
    this.changeSupport = new EventListenerSupport<ChangeListener>(ChangeListener.class);
    this.stateListener = new CDockableStateListener() {

        @Override//from  w  w w  . jav a  2 s .  co  m
        public void visibilityChanged(CDockable d) {
            updateVisible(dockable.isVisible());
        }

        @Override
        public void extendedModeChanged(CDockable d, ExtendedMode mode) {
        }
    };
    this.focusListener = new CFocusListener() {

        @Override
        public void focusLost(CDockable dockable) {
            updateFocus(false);
        }

        @Override
        public void focusGained(CDockable dockable) {
            updateFocus(true);
        }
    };
    return this;
}

From source file:com.anrisoftware.prefdialog.miscswing.docks.dockingframes.dock.AbstractViewDockWindow.java

private Object readResolve() {
    this.changeSupport = new EventListenerSupport<ChangeListener>(ChangeListener.class);
    this.stateListener = new CDockableStateListener() {

        @Override/*from w  w w  .j  ava 2s.co  m*/
        public void visibilityChanged(CDockable d) {
            updateVisible(dockable.isVisible());
        }

        @Override
        public void extendedModeChanged(CDockable d, ExtendedMode mode) {
        }
    };
    this.focusListener = new CFocusListener() {

        @Override
        public void focusLost(CDockable dockable) {
            updateFocus(false);
        }

        @Override
        public void focusGained(CDockable dockable) {
            updateFocus(true);
        }
    };
    return this;
}

From source file:com.anrisoftware.prefdialog.miscswing.lists.ActionList.java

/**
 * @see #decorate(JList)/*w  w w .j av a2  s.c  o  m*/
 */
ActionList(JList<E> list) {
    this.actionListeners = new EventListenerSupport<ActionListener>(ActionListener.class);
    this.list = list;
    setupList();
}

From source file:com.anrisoftware.globalpom.reflection.annotations.AnnotationDiscoveryImpl.java

/**
 * @see AnnotationDiscoveryFactory#create(Object, AnnotationFilter)
 *//*  w  w w. ja  v  a 2  s  .c o  m*/
@Inject
AnnotationDiscoveryImpl(AnnotationDiscoveryImplLogger logger, BeanAccessFactory accessFactory,
        @Assisted Object bean, @Assisted AnnotationFilter filter) {
    this.log = logger;
    this.bean = bean;
    this.filter = filter;
    this.accessFactory = accessFactory;
    this.listeners = new EventListenerSupport<AnnotationListener>(AnnotationListener.class);
}

From source file:com.anrisoftware.prefdialog.miscswing.lists.CheckListItem.java

/**
 * Constructs the list item from the specified value.
 *
 * @param value// www .ja  v a2  s.com
 *            the item value.
 */
@SuppressWarnings("unchecked")
@Inject
public CheckListItem(@Assisted Object value) {
    this.changeSupport = new EventListenerSupport<ChangeListener>(ChangeListener.class);
    this.value = (E) value;
    this.selected = false;
}

From source file:com.anrisoftware.prefdialog.miscswing.multichart.model.AbstractChartModel.java

private Object readResolve() {
    this.s = new EventListenerSupport<ChartModelListener>(ChartModelListener.class);
    this.p = new PropertyChangeSupport(this);
    return this;
}

From source file:com.anrisoftware.prefdialog.miscswing.docks.dockingframes.core.DockingFramesDock.java

/**
 * @see DockFactory#create()//from  www . j  a v a  2  s  .c  om
 */
DockingFramesDock() {
    this.layoutListeners = new EventListenerSupport<LayoutListener>(LayoutListener.class);
    this.viewDocks = new ConcurrentHashMap<SingleCDockable, ViewDockWindow>();
    this.editorDocks = new ConcurrentHashMap<MultipleCDockable, EditorDockWindow>();
    this.changeListeners = new EventListenerSupport<ChangeListener>(ChangeListener.class);
    this.editorsFocusListener = new CFocusListener() {

        @Override
        public void focusLost(CDockable dockable) {
            fireEditorDockFocusLost(dockable);
        }

        @Override
        public void focusGained(CDockable dockable) {
            fireEditorDockFocusGained(dockable);
        }
    };
    this.controlListener = new CControlListener() {

        @Override
        public void removed(CControl control, CDockable dockable) {
            editorDocks.remove(dockable);
        }

        @Override
        public void opened(CControl control, CDockable dockable) {
        }

        @Override
        public void closed(CControl control, CDockable dockable) {
        }

        @Override
        public void added(CControl control, CDockable dockable) {
        }
    };
}

From source file:org.duracloud.sync.endpoint.DuraStoreSyncEndpoint.java

public DuraStoreSyncEndpoint(ContentStore contentStore, String username, String spaceId, boolean syncDeletes,
        boolean syncUpdates, boolean renameUpdates, boolean jumpStart, String updateSuffix, String prefix) {
    this.contentStore = contentStore;
    this.username = username;
    this.storeId = this.contentStore.getStoreId();
    this.spaceId = spaceId;
    this.syncDeletes = syncDeletes;
    this.syncUpdates = syncUpdates;
    this.renameUpdates = renameUpdates;
    this.jumpStart = jumpStart;
    this.updateSuffix = updateSuffix;
    this.prefix = prefix;
    this.listenerList = new EventListenerSupport<>(EndPointListener.class);

    logger.info("Sync endpoint ready to transfer to space:" + spaceId + " in store: " + storeId
            + " with config: " + " syncDeletes:" + syncDeletes + ", syncUpdates:" + syncUpdates
            + ", renameUpdates:" + renameUpdates + ", jumpStart:" + jumpStart + ", updateSuffix:" + updateSuffix
            + ", prefix:" + prefix);

    ensureSpaceExists();/*from w  ww  . j a v  a 2  s . c om*/
}

From source file:org.duracloud.sync.mgmt.ChangedList.java

private ChangedList() {
    fileList = new LinkedHashMap<String, ChangedFile>();
    reservedFiles = new LinkedHashMap<String, ChangedFile>();
    this.fileExclusionManager = new FileExclusionManager();
    listVersion = 0;//  w  w  w  .j  av a2s.co  m
    listeners = new EventListenerSupport<ChangedListListener>(ChangedListListener.class);
    this.executorService = Executors.newSingleThreadExecutor();
}

From source file:org.duracloud.syncui.service.SyncProcessManagerImpl.java

@Autowired
public SyncProcessManagerImpl(SyncConfigurationManager syncConfigurationManager,
        ContentStoreManagerFactory contentStoreManagerFactory, SyncOptimizeManager syncOptimizeManager) {
    this.syncConfigurationManager = syncConfigurationManager;
    this.currentState = this.stoppedState;
    this.listeners = new EventListenerSupport<>(SyncStateChangeListener.class);
    this.syncProcessStateTransitionValidator = new SyncProcessStateTransitionValidator();

    this.contentStoreManagerFactory = contentStoreManagerFactory;
    this.syncOptimizeManager = syncOptimizeManager;
    this.backupDir = new File(syncConfigurationManager.getWorkDirectory(), "backup");
    syncBackupManager = new SyncBackupManager(this.backupDir, BACKUP_FREQUENCY,
            syncConfigurationManager.retrieveDirectoryConfigs().toFileList());

    ChangedList.getInstance().addListener(this.changedListListener = new InternalChangedListListener());

}