Package net.sourceforge.ztail.ui.tabs

Examples of net.sourceforge.ztail.ui.tabs.TabItem


    sess.togglePauseState();
    BaseManager.instance().updateMenu(BaseManager.MENU_REFRESH_PAUSE_STATE);
  }
 
  public void clearTabReq() {
    TabItem tab = TabPanelManager.instance().getActiveTab();
   
    if (tab == null) return;
   
    tab.clearText();
  }
View Full Code Here


  }
 
  private void openTab(ReaderSession rSess) {
    final TabSession tSess = new TabSession();
   
    TabItem tabItem = TabPanelManager.instance().createTab();
   
    tabItem.setSession(tSess);
    tabItem.setCloseAction(new UXDefaultAction() {
      public void doAction() {
        closeTab(tSess);
      }
    });
   
View Full Code Here

    final FindWindow win = new FindWindow(sh);
    UXWindowsUtil.screenCenter(win);
    win.setFindAction(new UXAbstractAction() {
      @Override
      public void doAction() {
        TabItem tab = TabPanelManager.instance().getActiveTab();
        SearchEntity sEntity = new SearchEntity(
            tab.getText(),
            win.getPattern(),
            win.isRegx(),
            win.isCaseSensitive());
       
        SearchResult rs;
        try {
           rs = SearchService.instance().compileSearch(sEntity);
        } catch (ServiceException e) {
          BaseController.instance().showErrorMessage(e);
          return;
        }
       
        int ccPos = tab.getCarretPosition();
        SearchResult.SearchRangeResult srr = null;
       
        Iterator<SearchRangeResult> it = rs.getIterator();
       
        if (!it.hasNext()) {
          BaseController.instance().showWarningMessage("String not found");
          return;
        }
       
        boolean wasFound = false;
       
        while (it.hasNext()) {
          srr = it.next();
         
          if (win.getDirection() == FindWindow.DIRECTION_UP) {
            if (srr.start < ccPos) {
              wasFound = true;
              tab.select(srr.start, srr.end);
              break;
            }
          } else {
            if (srr.start >= ccPos) {
              wasFound = true;
              tab.select(srr.start, srr.end);
              break;
            }
          }
        }
       
View Full Code Here

  public void buildUp() {
   
  }
 
  public TabItem createTab() {
    TabItem tab = new TabItem(tabPanel);
    tabPanel.addTabItem(tab);
    tabPanel.focusTab(tab);
    return tab;
  }
View Full Code Here

TOP

Related Classes of net.sourceforge.ztail.ui.tabs.TabItem

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.