Java Code Examples for java.awt.event.WindowEvent#WINDOW_OPENED

The following examples show how to use java.awt.event.WindowEvent#WINDOW_OPENED . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TradingLoginHandoffDialogHandler.java    From IBC with GNU General Public License v3.0 5 votes vote down vote up
@Override
public boolean filterEvent(Window window, int eventId) {
    switch (eventId) {
        case WindowEvent.WINDOW_OPENED:
            return true;
        default:
            return false;
    }
}
 
Example 2
Source File: NonBrokerageAccountDialogHandler.java    From IBC with GNU General Public License v3.0 5 votes vote down vote up
@Override
public boolean filterEvent(Window window, int eventId) {
    switch (eventId) {
        case WindowEvent.WINDOW_OPENED:
            return true;
        default:
            return false;
    }
}
 
Example 3
Source File: ExitSessionFrameHandler.java    From IBC with GNU General Public License v3.0 5 votes vote down vote up
public void handleWindow(Window window, int eventID) {
    if (eventID == WindowEvent.WINDOW_OPENED) {
        exitSessionFrame = (JFrame) window;
    }

    if (Settings.settings().getBoolean("IbAutoClosedown", false)) return;

    if (! adjustExitSessionTime(window)) {
        Utils.logError("could not change AutoLogoff time because we could not find one of the controls.");
    }
}
 
Example 4
Source File: ExitSessionFrameHandler.java    From IBC with GNU General Public License v3.0 5 votes vote down vote up
public boolean filterEvent(Window window, int eventId) {
    switch (eventId) {
        case WindowEvent.WINDOW_OPENED:
        case WindowEvent.WINDOW_ACTIVATED:
            return true;
        default:
            return false;
    }
}
 
Example 5
Source File: TipOfTheDayDialogHandler.java    From IBC with GNU General Public License v3.0 5 votes vote down vote up
public boolean filterEvent(Window window, int eventId) {
    switch (eventId) {
        case WindowEvent.WINDOW_OPENED:
        case WindowEvent.WINDOW_ACTIVATED:
            return true;
        default:
            return false;
    }
}
 
Example 6
Source File: PasswordExpiryWarningFrameHandler.java    From IBC with GNU General Public License v3.0 5 votes vote down vote up
public boolean filterEvent(Window window, int eventId) {
    switch (eventId) {
        case WindowEvent.WINDOW_OPENED:
        case WindowEvent.WINDOW_ACTIVATED:
            return true;
        default:
            return false;
    }
}
 
Example 7
Source File: MainWindowFrameHandler.java    From ib-controller with GNU General Public License v3.0 5 votes vote down vote up
@Override
public boolean filterEvent(Window window, int eventId) {
    switch (eventId) {
        case WindowEvent.WINDOW_OPENED:
            return true;
        default:
            return false;
    }
}
 
Example 8
Source File: ExitSessionFrameHandler.java    From ib-controller with GNU General Public License v3.0 5 votes vote down vote up
public void handleWindow(Window window, int eventID) {
    if (eventID == WindowEvent.WINDOW_OPENED) {
        exitSessionFrame = (JFrame) window;
    }

    if (Settings.settings().getBoolean("IbAutoClosedown", false)) return;

    if (! adjustExitSessionTime(window)) {
        Utils.logError("could not change AutoLogoff time because we could not find one of the controls.");
    }
}
 
Example 9
Source File: MainWindowFrameHandler.java    From IBC with GNU General Public License v3.0 5 votes vote down vote up
@Override
public boolean filterEvent(Window window, int eventId) {
    switch (eventId) {
        case WindowEvent.WINDOW_OPENED:
            return true;
        default:
            return false;
    }
}
 
Example 10
Source File: NewerVersionFrameHandler.java    From IBC with GNU General Public License v3.0 5 votes vote down vote up
public boolean filterEvent(Window window, int eventId) {
    switch (eventId) {
        case WindowEvent.WINDOW_OPENED:
        case WindowEvent.WINDOW_ACTIVATED:
            return true;
        default:
            return false;
    }
}
 
Example 11
Source File: NSEComplianceFrameHandler.java    From IBC with GNU General Public License v3.0 5 votes vote down vote up
public boolean filterEvent(Window window, int eventId) {
    switch (eventId) {
        case WindowEvent.WINDOW_OPENED:
        case WindowEvent.WINDOW_ACTIVATED:
            return true;
        default:
            return false;
    }
}
 
Example 12
Source File: ReloginDialogHandler.java    From ib-controller with GNU General Public License v3.0 5 votes vote down vote up
@Override
public boolean filterEvent(Window window, int eventId) {
    switch (eventId) {
        case WindowEvent.WINDOW_OPENED:
            return true;
        default:
            return false;
    }
}
 
Example 13
Source File: TradesFrameHandler.java    From ib-controller with GNU General Public License v3.0 5 votes vote down vote up
@Override
public boolean filterEvent(Window window, int eventId) {
    switch (eventId) {
        case WindowEvent.WINDOW_OPENED:
        case WindowEvent.WINDOW_CLOSING:
        case WindowEvent.WINDOW_CLOSED:
            return true;
        default:
            return false;
    }
}
 
Example 14
Source File: Window.java    From Bytecoder with Apache License 2.0 5 votes vote down vote up
/**
 * Processes window events occurring on this window by
 * dispatching them to any registered WindowListener objects.
 * NOTE: This method will not be called unless window events
 * are enabled for this component; this happens when one of the
 * following occurs:
 * <ul>
 * <li>A WindowListener object is registered via
 *     {@code addWindowListener}
 * <li>Window events are enabled via {@code enableEvents}
 * </ul>
 * <p>Note that if the event parameter is {@code null}
 * the behavior is unspecified and may result in an
 * exception.
 *
 * @param e the window event
 * @see Component#enableEvents
 */
protected void processWindowEvent(WindowEvent e) {
    WindowListener listener = windowListener;
    if (listener != null) {
        switch(e.getID()) {
            case WindowEvent.WINDOW_OPENED:
                listener.windowOpened(e);
                break;
            case WindowEvent.WINDOW_CLOSING:
                listener.windowClosing(e);
                break;
            case WindowEvent.WINDOW_CLOSED:
                listener.windowClosed(e);
                break;
            case WindowEvent.WINDOW_ICONIFIED:
                listener.windowIconified(e);
                break;
            case WindowEvent.WINDOW_DEICONIFIED:
                listener.windowDeiconified(e);
                break;
            case WindowEvent.WINDOW_ACTIVATED:
                listener.windowActivated(e);
                break;
            case WindowEvent.WINDOW_DEACTIVATED:
                listener.windowDeactivated(e);
                break;
            default:
                break;
        }
    }
}
 
Example 15
Source File: SecurityCodeDialogHandler.java    From ib-controller with GNU General Public License v3.0 5 votes vote down vote up
@Override
public boolean filterEvent(Window window, int eventId) {
    switch (eventId) {
        case WindowEvent.WINDOW_OPENED:
            return true;
        default:
            return false;
    }
}
 
Example 16
Source File: TipOfTheDayDialogHandler.java    From ib-controller with GNU General Public License v3.0 5 votes vote down vote up
public boolean filterEvent(Window window, int eventId) {
    switch (eventId) {
        case WindowEvent.WINDOW_OPENED:
        case WindowEvent.WINDOW_ACTIVATED:
            return true;
        default:
            return false;
    }
}
 
Example 17
Source File: NewerVersionDialogHandler.java    From IBC with GNU General Public License v3.0 5 votes vote down vote up
public boolean filterEvent(Window window, int eventId) {
    switch (eventId) {
        case WindowEvent.WINDOW_OPENED:
        case WindowEvent.WINDOW_ACTIVATED:
            return true;
        default:
            return false;
    }
}
 
Example 18
Source File: AbstractLoginHandler.java    From ib-controller with GNU General Public License v3.0 5 votes vote down vote up
@Override
public boolean filterEvent(Window window, int eventId) {
    switch (eventId) {
        case WindowEvent.WINDOW_OPENED:
            return true;
        default:
            return false;
    }
}
 
Example 19
Source File: ExitConfirmationDialogHandler.java    From IBC with GNU General Public License v3.0 5 votes vote down vote up
public boolean filterEvent(Window window, int eventId) {
    switch (eventId) {
        case WindowEvent.WINDOW_OPENED:
            return true;
        default:
            return false;
    }
}
 
Example 20
Source File: MainWindowFrameHandler.java    From ib-controller with GNU General Public License v3.0 4 votes vote down vote up
@Override
public void handleWindow(Window window, int eventID) {
    if (eventID != WindowEvent.WINDOW_OPENED) return;
    
    MainWindowManager.mainWindowManager().setMainWindow((JFrame) window);
}