当前位置: 首页>>代码示例>>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;未经允许,请勿转载。