Search in sources :

Example 21 with SimpleTextEntryWindow

use of com.biglybt.ui.swt.SimpleTextEntryWindow in project BiglyBT by BiglySoftware.

the class TableViewPainted method openFilterDialog.

@Override
public void openFilterDialog() {
    if (filter == null) {
        return;
    }
    SimpleTextEntryWindow entryWindow = new SimpleTextEntryWindow();
    entryWindow.initTexts("MyTorrentsView.dialog.setFilter.title", null, "MyTorrentsView.dialog.setFilter.text", new String[] { MessageText.getString(getTableID() + "View" + ".header") });
    entryWindow.setPreenteredText(filter.text, false);
    entryWindow.prompt(new UIInputReceiverListener() {

        @Override
        public void UIInputReceiverClosed(UIInputReceiver entryWindow) {
            if (!entryWindow.hasSubmittedInput()) {
                return;
            }
            String message = entryWindow.getSubmittedInput();
            if (message == null) {
                message = "";
            }
            setFilterText(message);
        }
    });
}
Also used : SimpleTextEntryWindow(com.biglybt.ui.swt.SimpleTextEntryWindow) UIInputReceiver(com.biglybt.pif.ui.UIInputReceiver) UIInputReceiverListener(com.biglybt.pif.ui.UIInputReceiverListener)

Aggregations

UIInputReceiver (com.biglybt.pif.ui.UIInputReceiver)21 UIInputReceiverListener (com.biglybt.pif.ui.UIInputReceiverListener)21 SimpleTextEntryWindow (com.biglybt.ui.swt.SimpleTextEntryWindow)21 CoreRunningListener (com.biglybt.core.CoreRunningListener)6 MenuItemListener (com.biglybt.pif.ui.menus.MenuItemListener)6 UserPrompterResultListener (com.biglybt.ui.UserPrompterResultListener)6 DisposeEvent (org.eclipse.swt.events.DisposeEvent)6 DisposeListener (org.eclipse.swt.events.DisposeListener)6 TrackerEditorListener (com.biglybt.ui.swt.maketorrent.TrackerEditorListener)5 DownloadManager (com.biglybt.core.download.DownloadManager)4 UIFunctions (com.biglybt.ui.UIFunctions)3 MenuBuildUtils (com.biglybt.ui.swt.MenuBuildUtils)3 MessageBoxShell (com.biglybt.ui.swt.shells.MessageBoxShell)3 List (java.util.List)3 SelectionEvent (org.eclipse.swt.events.SelectionEvent)3 MessageText (com.biglybt.core.internat.MessageText)2 PEPeer (com.biglybt.core.peer.PEPeer)2 PEPeerManager (com.biglybt.core.peer.PEPeerManager)2 TagProperty (com.biglybt.core.tag.TagFeatureProperties.TagProperty)2 UIManagerListener (com.biglybt.pif.ui.UIManagerListener)2