當前位置: 首頁>>代碼示例>>Java>>正文


Java HashTable類代碼示例

本文整理匯總了Java中org.apache.batik.dom.util.HashTable的典型用法代碼示例。如果您正苦於以下問題:Java HashTable類的具體用法?Java HashTable怎麽用?Java HashTable使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


HashTable類屬於org.apache.batik.dom.util包,在下文中一共展示了HashTable類的12個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: removeEventListenerNS

import org.apache.batik.dom.util.HashTable; //導入依賴的package包/類
/**
 * Deregisters an event listener.
 */
public void removeEventListenerNS(String namespaceURI,
                                  String type,
                                  EventListener listener,
                                  boolean useCapture) {
    HashTable listeners;
    if (useCapture) {
        listeners = capturingListeners;
    } else {
        listeners = bubblingListeners;
    }
    if (listeners == null) {
        return;
    }
    EventListenerList list = (EventListenerList) listeners.get(type);
    if (list != null) {
        list.removeListener(namespaceURI, listener);
        if (list.size() == 0) {
            listeners.remove(type);
        }
    }
}
 
開發者ID:git-moss,項目名稱:Push2Display,代碼行數:25,代碼來源:EventSupport.java

示例2: removeImplementationEventListenerNS

import org.apache.batik.dom.util.HashTable; //導入依賴的package包/類
/**
 * Unregisters an implementation event listener.
 */
public void removeImplementationEventListenerNS(String namespaceURI,
                                                String type,
                                                EventListener listener,
                                                boolean useCapture) {
    HashTable listeners = useCapture ? capturingImplementationListeners
                                     : bubblingImplementationListeners;
    if (listeners == null) {
        return;
    }
    EventListenerList list = (EventListenerList) listeners.get(type);
    if (list == null) {
        return;
    }
    list.removeListener(namespaceURI, listener);
    if (list.size() == 0) {
        listeners.remove(type);
    }
}
 
開發者ID:git-moss,項目名稱:Push2Display,代碼行數:22,代碼來源:XBLEventSupport.java

示例3: getCSSStyleSheet

import org.apache.batik.dom.util.HashTable; //導入依賴的package包/類
/**
 * Returns the associated style-sheet.
 */
public StyleSheet getCSSStyleSheet() {
    if (styleSheet == null) {
        HashTable attrs = getPseudoAttributes();
        String type = (String)attrs.get("type");

        if ("text/css".equals(type)) {
            String title     = (String)attrs.get("title");
            String media     = (String)attrs.get("media");
            String href      = (String)attrs.get("href");
            String alternate = (String)attrs.get("alternate");
            SVGOMDocument doc = (SVGOMDocument)getOwnerDocument();
            ParsedURL durl = doc.getParsedURL();
            ParsedURL burl = new ParsedURL(durl, href);
            CSSEngine e = doc.getCSSEngine();
            
            styleSheet = e.parseStyleSheet(burl, media);
            styleSheet.setAlternate("yes".equals(alternate));
            styleSheet.setTitle(title);
        }
    }
    return styleSheet;
}
 
開發者ID:git-moss,項目名稱:Push2Display,代碼行數:26,代碼來源:SVGStyleSheetProcessingInstruction.java

示例4: getApplicationList

import org.apache.batik.dom.util.HashTable; //導入依賴的package包/類
/**
 * Transform detected app in the project into Application list by getting info in the Clever Cloud API.
 *
 * @param appList List of HashTable containing : {"AppID" => String, "Repository" => GitRepository}
 * @return ArrayList containing {@link Application} of the current project
 */
@NotNull
public ArrayList<Application> getApplicationList(@NotNull List<HashTable> appList) {
  ArrayList<Application> applicationList = new ArrayList<>();
  CcApi ccApi = CcApi.getInstance(myProject);

  for (HashTable app : appList) {
    String response = ccApi.apiRequest(String.format("/self/applications/%s", app.get(AppInfos.APP_ID)));

    if (response != null) {
      ObjectMapper mapper = new ObjectMapper();

      try {
        Application application = mapper.readValue(response, Application.class);
        application.deployment.repository = (String)app.get(AppInfos.REPOSITORY);
        applicationList.add(application);
      }
      catch (IOException e) {
        e.printStackTrace();
      }
    }
  }

  return applicationList;
}
 
開發者ID:CleverCloud,項目名稱:clever-intellij-plugin,代碼行數:31,代碼來源:GitProjectDetector.java

示例5: getEventListeners

import org.apache.batik.dom.util.HashTable; //導入依賴的package包/類
/**
 * Returns a list event listeners depending on the specified event
 * type and phase.
 * @param type the event type
 * @param useCapture
 */
public EventListenerList getEventListeners(String type,
                                           boolean useCapture) {
    HashTable listeners
        = useCapture ? capturingListeners : bubblingListeners;
    if (listeners == null) {
        return null;
    }
    return (EventListenerList) listeners.get(type);
}
 
開發者ID:git-moss,項目名稱:Push2Display,代碼行數:16,代碼來源:EventSupport.java

示例6: extractXSLProcessingInstruction

import org.apache.batik.dom.util.HashTable; //導入依賴的package包/類
/**
 * Extracts the first XSL processing instruction from the input 
 * XML document. 
 */
protected String extractXSLProcessingInstruction(Document doc) {
    Node child = doc.getFirstChild();
    while (child != null) {
        if (child.getNodeType() == Node.PROCESSING_INSTRUCTION_NODE) {
            ProcessingInstruction pi 
                = (ProcessingInstruction)child;
            
            HashTable table = new HashTable();
            DOMUtilities.parseStyleSheetPIData(pi.getData(),
                                               table);

            Object type = table.get(PSEUDO_ATTRIBUTE_TYPE);
            if (XSL_PROCESSING_INSTRUCTION_TYPE.equals(type)) {
                Object href = table.get(PSEUDO_ATTRIBUTE_HREF);
                if (href != null) {
                    return href.toString();
                } else {
                    return null;
                }
            }
        }
        child = child.getNextSibling();
    }

    return null;
}
 
開發者ID:git-moss,項目名稱:Push2Display,代碼行數:31,代碼來源:XMLInputHandler.java

示例7: if

import org.apache.batik.dom.util.HashTable; //導入依賴的package包/類
/**
 * Returns the implementation listneers.
 */
public EventListenerList getImplementationEventListeners
        (String type, boolean useCapture) {
    HashTable listeners = useCapture ? capturingImplementationListeners
                                     : bubblingImplementationListeners;
    if (listeners == null) {
        return null;
    }
    return (EventListenerList) listeners.get(type);
}
 
開發者ID:git-moss,項目名稱:Push2Display,代碼行數:13,代碼來源:XBLEventSupport.java

示例8: detectCleverApp

import org.apache.batik.dom.util.HashTable; //導入依賴的package包/類
private void detectCleverApp() {
  ProjectLevelVcsManagerImpl vcsManager = (ProjectLevelVcsManagerImpl)myProjectLevelVcsManager;
  vcsManager.addInitializationRequest(VcsInitObject.AFTER_COMMON, () -> {
    GitVcs gitVcs = GitVcs.getInstance(myProject);
    VirtualFile[] gitRoots = new VirtualFile[0];

    if (gitVcs != null) gitRoots = vcsManager.getRootsUnderVcs(gitVcs);

    for (VirtualFile root : gitRoots) {
      GitRepository repo = myGitRepositoryManager.getRepositoryForRoot(root);

      if (repo != null) {
        GitProjectDetector gitProjectDetector = new GitProjectDetector(myProject);
        ArrayList<HashTable> appList = gitProjectDetector.getAppList();

        if (!appList.isEmpty()) {
          ProjectSettings projectSettings = ServiceManager.getService(myProject, ProjectSettings.class);

          new Notification("Vcs Important Messages", "Clever Cloud application detection", String.format(
            "The Clever IDEA plugin has detected that you have %d remotes pointing to Clever Cloud. " +
            "<a href=\"\">Click here</a> to enable integration.", appList.size()), NotificationType.INFORMATION,
                           hyperlinkUpdaterListener(gitProjectDetector, appList, projectSettings)).notify(myProject);
        }
      }
    }
  });
}
 
開發者ID:CleverCloud,項目名稱:clever-intellij-plugin,代碼行數:28,代碼來源:CleverCloudProjectComponent.java

示例9: hyperlinkUpdaterListener

import org.apache.batik.dom.util.HashTable; //導入依賴的package包/類
@NotNull
private NotificationListener hyperlinkUpdaterListener(final GitProjectDetector gitProjectDetector,
                                                      final ArrayList<HashTable> appList,
                                                      final ProjectSettings projectSettings) {
  return (notification, event) -> {
    projectSettings.applications = gitProjectDetector.getApplicationList(appList);
    notification.expire();

    new Notification("Vcs Minor Notifications", "Applications successfully linked", String
      .format("The following Clever Cloud application have been linked successfully :<br />%s",
              ApplicationsUtilities.remoteListToString(projectSettings.applications)), NotificationType.INFORMATION).notify(myProject);
  };
}
 
開發者ID:CleverCloud,項目名稱:clever-intellij-plugin,代碼行數:14,代碼來源:CleverCloudProjectComponent.java

示例10: getAppList

import org.apache.batik.dom.util.HashTable; //導入依賴的package包/類
/**
 * Find remote corresponding to a Clever Cloud app in the remotes of the current project.
 *
 * @return List of HashTable containing :  {"AppID" => String, "Repository" => GitRepository}
 */
@NotNull
public ArrayList<HashTable> getAppList() {
  ArrayList<HashTable> appIdList = new ArrayList<>();
  List<GitRepository> gitRepositoryList;
  gitRepositoryList = myGitRepositoryManager != null ? myGitRepositoryManager.getRepositories() : null;

  if (gitRepositoryList == null) return appIdList;

  for (GitRepository aGitRepository : gitRepositoryList) {
    Collection<GitRemote> gitRemotes = aGitRepository.getRemotes();

    for (GitRemote aGitRemote : gitRemotes) {
      List<String> remoteUrls = aGitRemote.getUrls();

      for (String anUrl : remoteUrls) {
        Matcher matcher = pattern.matcher(anUrl);

        if (matcher.matches()) {
          HashTable hashTable = new HashTable();
          hashTable.put(AppInfos.APP_ID, matcher.group(1));
          hashTable.put(AppInfos.REPOSITORY, aGitRepository.getGitDir().getParent().getPath());
          appIdList.add(hashTable);
        }
      }
    }
  }

  return appIdList;
}
 
開發者ID:CleverCloud,項目名稱:clever-intellij-plugin,代碼行數:35,代碼來源:GitProjectDetector.java

示例11: createStyleSheet

import org.apache.batik.dom.util.HashTable; //導入依賴的package包/類
/**
 * Creates a stylesheet from the data of an xml-stylesheet
 * processing instruction or return null.
 */
public StyleSheet createStyleSheet(Node n, HashTable attrs) {
    throw new UnsupportedOperationException
        ("StyleSheetFactory.createStyleSheet is not implemented"); // XXX
}
 
開發者ID:git-moss,項目名稱:Push2Display,代碼行數:9,代碼來源:SVGDOMImplementation.java

示例12: createStyleSheet

import org.apache.batik.dom.util.HashTable; //導入依賴的package包/類
/**
 * Creates a stylesheet from the data of the xml-stylesheet
 * processing instruction or return null when it is not possible
 * to create the given stylesheet.
 */
StyleSheet createStyleSheet(Node node, HashTable pseudoAttrs);
 
開發者ID:git-moss,項目名稱:Push2Display,代碼行數:7,代碼來源:StyleSheetFactory.java


注:本文中的org.apache.batik.dom.util.HashTable類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。