Tabnine Logo
HippoIcon
Code IndexAdd Tabnine to your IDE (free)

How to use
HippoIcon
in
org.hippoecm.frontend.plugins.standards.icon

Best Java code snippets using org.hippoecm.frontend.plugins.standards.icon.HippoIcon (Showing top 20 results out of 315)

origin: org.onehippo.cms7/hippo-cms-editor-frontend

@Override
protected Component getIcon(final String id) {
  return HippoIcon.fromSprite(id, Icon.PENCIL_SQUARE);
}
origin: org.onehippo.cms7/hippo-cms-editor-frontend

@Override
protected Component getIcon(final String id) {
  return HippoIcon.inline(id, CmsIcon.FLOPPY_TIMES_CIRCLE);
}
origin: org.onehippo.cms7/hippo-cms-api

public static HippoIcon getIconForNodeType(final String id, final NodeType type, final Icon defaultIcon, final IconSize size) {
  final String nodeTypeIconName = StringUtils.replace(type.getName(), ":", "-");
  final ResourceReference reference = BrowserStyle.getIconOrNull(nodeTypeIconName, size);
  if (reference != null) {
    final HippoIcon icon = HippoIcon.fromResource(id, reference, size);
    icon.addCssClass("hi");
    icon.addCssClass("hi-custom-node-type");
    icon.addCssClass("hi-" + size.name().toLowerCase());
    return icon;
  }
  return HippoIcon.fromSprite(id, defaultIcon, size);
}
origin: org.onehippo.cms7/hippo-cms-api

public HippoIcon replaceFromResource(final HippoIcon oldIcon, final ResourceReference newReference,
                   final Position position) {
  HippoIcon newCopy = HippoIcon.fromResource(oldIcon.getId(), newReference);
  addIcon(newCopy, position);
  return newCopy;
}
origin: org.onehippo.cms7/hippo-cms-api

public HippoIcon replaceFromSprite(final HippoIcon oldIcon, final Icon newIcon, final Position position) {
  HippoIcon newCopy = HippoIcon.fromSprite(oldIcon.getId(), newIcon);
  addIcon(newCopy, position);
  return newCopy;
}
origin: org.onehippo.cms7/hippo-cms-api

public HippoIcon replaceInline(final HippoIcon oldIcon, final CmsIcon newIcon, final Position position) {
  HippoIcon newCopy = HippoIcon.inline(oldIcon.getId(), newIcon);
  addIcon(newCopy, position);
  return newCopy;
}
origin: org.onehippo.cms7/hippo-cms-editor-frontend

private Component getDocumentIcon(final Node node, final String id, final IconSize size) throws RepositoryException {
  if (localeProvider != null) {
    if (node.isNodeType(HippoTranslationNodeType.NT_TRANSLATED)) {
      String localeName = node.getProperty(HippoTranslationNodeType.LOCALE).getString();
      for (HippoLocale locale : localeProvider.getLocales()) {
        if (localeName.equals(locale.getName())) {
          ResourceReference reference = locale.getIcon(size, LocaleState.EXISTS);
          return HippoIcon.fromResource(id, reference);
        }
      }
      log.info("Locale '{}' was not found in locale provider", localeName);
    }
  }
  return HippoIcon.fromSprite(id, Icon.FILE_TEXT);
}
origin: org.onehippo.cms7/hippo-cms-api

  public BreadCrumbComponent(String id, long index, IBreadCrumbModel breadCrumbModel,
      final IBreadCrumbParticipant participant, boolean enableLink) {
    super(id);
    HippoIcon icon = HippoIcon.fromSprite("sep", Icon.CHEVRON_RIGHT);
    icon.addCssClass("breadcrumbs-separator");
    icon.setVisible(enableLink);
    add(icon);
    BreadCrumbLink link = new AjaxBreadCrumbLink("link", breadCrumbModel) {
      private static final long serialVersionUID = 1L;
      protected IBreadCrumbParticipant getParticipant(String componentId) {
        return participant;
      }
    };
    link.setEnabled(enableLink);
    add(link);
    IModel<String> title;
    if (participant instanceof IPanelPluginParticipant) {
      title = ((IPanelPluginParticipant) participant).getTitle(this);
    } else {
      title = participant.getTitle();
    }
    link.add(new Label("label", title).setRenderBodyOnly(true));
  }
}
origin: org.onehippo.cms7/hippo-cms-api

  @Override
  protected void initialize() {
    add(CssClass.append(new AbstractReadOnlyModel<String>() {
      @Override
      public String getObject() {
        return StdWorkflow.this.isEnabled() ? "icon-enabled" : "icon-disabled";
      }
    }));
    Component icon = getIcon(ICON_ID);
    if (icon == null) {
      if (getIcon() != null) {
        // Legacy custom override
        icon = HippoIcon.fromResourceModel(ICON_ID, new LoadableDetachableModel<ResourceReference>() {
          @Override
          protected ResourceReference load() {
            return getIcon();
          }
        });
      } else {
        icon = HippoIcon.fromSprite(ICON_ID, Icon.GEAR);
      }
    }
    add(icon);
  }
});
origin: org.onehippo.cms7/hippo-cms-api

/**
 * Renders an icon stored in a resource. When the icon's file extension is '.svg',
 * the icon is rendered as an inline SVG image.
 * @param id the Wicket id of the icon
 * @param reference the resource to render
 * @return the icon component
 */
public static HippoIcon fromResource(final String id, final ResourceReference reference) {
  return fromResource(id, reference, -1, -1);
}
origin: org.onehippo.cms7/hippo-cms-api

public HippoIcon replaceCopyOf(final HippoIcon oldIcon, final HippoIcon newIcon,
                final Position position) {
  HippoIcon newCopy = HippoIcon.copy(newIcon, oldIcon.getId());
  addIcon(newCopy, position);
  return newCopy;
}
origin: org.onehippo.cms7/hippo-cms-api

  private void addPosition(final HippoIcon icon, final Position position) {
    if (position != null) {
      icon.addCssClass("hi-" + position.vertical);
      icon.addCssClass("hi-" + position.horizontal);
    }
  }
}
origin: org.onehippo.cms7/hippo-cms-api

public HippoIcon addCopyOf(final HippoIcon icon, final Position position) {
  HippoIcon copy = HippoIcon.copy(icon, icons.newChildId());
  addIcon(copy, position);
  return copy;
}
origin: org.onehippo.cms7/hippo-cms-api

protected Component getIcon(final String id) {
  if (iconReference != null) {
    return HippoIcon.fromResource(id, iconReference);
  }
  return null;
}
origin: org.onehippo.cms7/hippo-cms-api

/**
 * Renders a hippo icon of size {@link IconSize#M} via a reference to the icon sprite.
 * @param id the Wicket id of the icon
 * @param icon the icon to render
 * @return the icon component
 */
public static HippoIcon fromSprite(final String id, final Icon icon) {
  return fromSprite(id, icon, IconSize.M);
}
origin: org.onehippo.cms7/hippo-cms-workflow-frontend

@Override
protected Component getIcon(final String id) {
  return HippoIcon.inline(id, CmsIcon.FILE_UNLOCKED);
}
origin: org.onehippo.cms7/hippo-cms-api

@Override
protected Component newNodeIcon(final MarkupContainer parent, final String id, final TreeNode node) {
  ResourceReference nodeIcon = super.getNodeIcon(node);
  return HippoIcon.fromResource(id, nodeIcon);
}
origin: org.onehippo.cms7/hippo-addon-channel-manager-frontend

@Override
protected Component getIcon(final String id) {
  return HippoIcon.fromSprite(id, Icon.GLOBE);
}
origin: org.onehippo.cms7/hippo-cms-workflow-frontend

@Override
protected Component getIcon(final String id) {
  return HippoIcon.inline(id, CmsIcon.FLOPPY_TIMES_CIRCLE);
}
origin: org.onehippo.cms7/hippo-cms-api

public HippoIcon addFromResource(final ResourceReference reference, final Position position) {
  final HippoIcon resourceIcon = HippoIcon.fromResource(icons.newChildId(), reference);
  addIcon(resourceIcon, position);
  return resourceIcon;
}
org.hippoecm.frontend.plugins.standards.iconHippoIcon

Most used methods

  • fromSprite
    Renders a hippo icon via a reference to the icon sprite.
  • inline
    Renders a hippo icon of size IconSize#M as an inline SVG. This makes it possible to, for example, st
  • fromResource
    Renders an icon stored in a resource, including 'width' and 'height' attributes. When the icon's fil
  • addCssClass
    Adds a CSS class to the top-level element of the rendered icon.
  • copy
    Renders a copy of the given icon, with a different Wicket ID.
  • fromResourceModel
    Renders an icon stored in a resource which is referenced by a Wicket model. When the icon's file ext
  • fromStream
    Renders and icon/image from a JcrResourceStream which is referenced by an IModel. Delegates renderin
  • getId
  • setVisible

Popular in Java

  • Updating database using SQL prepared statement
  • setContentView (Activity)
  • requestLocationUpdates (LocationManager)
  • addToBackStack (FragmentTransaction)
  • InputStreamReader (java.io)
    A class for turning a byte stream into a character stream. Data read from the source input stream is
  • DecimalFormat (java.text)
    A concrete subclass of NumberFormat that formats decimal numbers. It has a variety of features desig
  • Format (java.text)
    The base class for all formats. This is an abstract base class which specifies the protocol for clas
  • Collection (java.util)
    Collection is the root of the collection hierarchy. It defines operations on data collections and t
  • Locale (java.util)
    Locale represents a language/country/variant combination. Locales are used to alter the presentatio
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now