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

How to use
Link
in
com.jwebmp.core.base.html

Best Java code snippets using com.jwebmp.core.base.html.Link (Showing top 20 results out of 315)

origin: com.jwebmp.jre11/jwebmp-core

/**
 * Creates a link directly to the address in the specified target frame
 * <p>
 *
 * @param directToAddress
 *         The address to redirect to
 * @param targetFrameName
 *         The frame to redirect
 * @param component
 *         Includes raw text in the link
 */
public Link(String directToAddress, String targetFrameName, ComponentHierarchyBase component)
{
  super("a", ComponentTypes.Link);
  this.directToAddress = directToAddress;
  this.targetFrameName = targetFrameName;
  if (directToAddress != null)
  {
    addAttribute(LinkAttributes.HRef, directToAddress);
  }
  if (targetFrameName != null)
  {
    addAttribute(LinkAttributes.Target, targetFrameName);
  }
  add(component);
}
origin: com.jwebmp.jre11/jwebmp-bootstrap4

  @Override
  public boolean equals(Object o)
  {
    return super.equals(o);
  }
}
origin: com.jwebmp/jwebmp-bootstrap4

@Override
public int hashCode()
{
  return super.hashCode();
}
origin: com.jwebmp/jwebmp-core

/**
 * Creates a link directly to the address in the specified target frame
 * <p>
 *
 * @param directToAddress
 *         The address to redirect to
 * @param targetFrameName
 *         The frame to redirect
 * @param text
 *         Includes raw text in the link
 */
public Link(String directToAddress, String targetFrameName, String text)
{
  super("a", ComponentTypes.Link);
  this.directToAddress = directToAddress;
  this.targetFrameName = targetFrameName;
  if (directToAddress != null)
  {
    addAttribute(LinkAttributes.HRef, directToAddress);
  }
  if (targetFrameName != null)
  {
    addAttribute(LinkAttributes.Target, targetFrameName);
  }
  setText(text);
}
origin: com.jwebmp.jre10/jwebmp-bootstrap

li.addClass(BSComponentNavsOptions.Nav_Item);
Link link = new Link();
link.addClass(BSComponentNavsOptions.Nav_Link);
link.addAttribute(BSToggleAttributes.Data_Toggle, "tab");
link.addAttribute(BSAccordionAttributes.Role, "tab");
link.setDirectToAddress(tab.getTabContent()
              .getID(true));
if (!li.getText(0)
    .isEmpty())
  link.setText(li.getText(0));
  li.setText("");
  link.addClass(BSDefaultOptions.Active);
  tab.getTabContent()
    .addClass(BSDefaultOptions.Active);
origin: com.jwebmp/jwebmp-bootstrap4

/**
 * Adds a new list item (tab header that matches the right card-body) to the header with the given active property
 *
 * @param text
 * @param active
 *
 * @return
 */
@NotNull
public ListItem<?> addItem(String text, boolean active)
{
  ListItem<?> item = new ListItem<>();
  item.addClass(BSNavsOptions.Nav_Item);
  Link<?> link = new Link<>(StaticStrings.STRING_HASH);
  link.addClass(BSNavsOptions.Nav_Link);
  if (active)
  {
    link.addClass(BSNavsOptions.Active);
  }
  link.setText(text);
  item.add(link);
  add(item);
  return item;
}
origin: com.jwebmp.jre10/jwebmp-bootstrap

/**
 * Gets the panel footer as a link. Class cast exception may occur if you have set the footer to a custom component
 *
 * @return
 */
public Component getPanelFooter()
{
  if (panelFooter == null)
  {
    setPanelFooter(new Link(StaticStrings.STRING_HASH));
    return panelFooter;
  }
  return panelFooter;
}
origin: com.jwebmp.jre10/jwebmp-jquery-ui

/**
 * Creates a new theme pack item with the given values
 *
 * @param name
 * @param cssClass
 * @param iconImageLocation
 */
public ThemePackItem(String name, String cssClass, String iconImageLocation)
{
  this.name = name;
  this.cssClass = cssClass;
  this.iconImageLocation = iconImageLocation;
  link = new Link(cssClass);
  add(link);
  if (iconImageLocation != null && !iconImageLocation.isEmpty())
  {
    image = new Image(iconImageLocation);
    add(image);
  }
  span = new Span();
  span.addClass("themeName");
  span.setText(this.name);
  addClass(JQUIThemeBlocks.UI_Widget.toString());
  addClass(JQUIThemeBlocks.UI_Widget_Input.toString());
  addClass(JQUIThemeBlocks.UI_State_Active.toString());
  link.add(span);
}
origin: com.jwebmp/jwebmp-core

/**
 * Sets the address to direct to
 * <p>
 *
 * @param directToAddress
 */
@SuppressWarnings("unchecked")
@NotNull
public J setDirectToAddress(String directToAddress)
{
  this.directToAddress = directToAddress;
  addAttribute(LinkAttributes.HRef, directToAddress);
  return (J) this;
}
origin: com.jwebmp.jre10/jwebmp-bootstrap

mediaLink.add(getMediaComponent());
getChildren().remove(this.mediaLink);
this.mediaLink = null;
  this.mediaLink.addClass(BSComponentMediaOptions.Media_Left);
  this.mediaLink.addClass(BSComponentMediaOptions.Media_Right);
origin: com.jwebmp.jre10/jwebmp-bootstrap

/**
 * Sets the component displayed to the left or right (set that in the link)
 *
 * @param mediaComponent
 *
 * @return
 */
@Override
public BSMedia setMediaComponent(Component mediaComponent)
{
  if (this.mediaComponent != null)
  {
    getMediaLink().remove(this.mediaComponent);
    this.mediaComponent = null;
  }
  this.mediaComponent = mediaComponent;
  if (this.mediaComponent != null)
  {
    this.mediaComponent.addClass(BSComponentMediaOptions.Media_Object);
    getMediaLink().add(this.mediaComponent);
  }
  return this;
}
origin: com.jwebmp.jre11/jwebmp-bootstrap

li.addClass(BSComponentNavsOptions.Nav_Item);
Link link = new Link();
link.addClass(BSComponentNavsOptions.Nav_Link);
link.addAttribute(BSToggleAttributes.Data_Toggle, "tab");
link.addAttribute(BSAccordionAttributes.Role, "tab");
link.setDirectToAddress(tab.getTabContent()
              .getID(true));
if (!li.getText(0)
    .isEmpty())
  link.setText(li.getText(0));
  li.setText("");
  link.addClass(BSDefaultOptions.Active);
  tab.getTabContent()
    .addClass(BSDefaultOptions.Active);
origin: com.jwebmp.jre10/jwebmp-bootstrap4

/**
 * Adds a new list item (tab header that matches the right card-body) to the header with the given active property
 *
 * @param text
 * @param active
 *
 * @return
 */
@NotNull
public ListItem<?> addItem(String text, boolean active)
{
  ListItem<?> item = new ListItem<>();
  item.addClass(BSNavsOptions.Nav_Item);
  Link<?> link = new Link<>(StaticStrings.STRING_HASH);
  link.addClass(BSNavsOptions.Nav_Link);
  if (active)
  {
    link.addClass(BSNavsOptions.Active);
  }
  link.setText(text);
  item.add(link);
  add(item);
  return item;
}
origin: com.jwebmp.jre10/jwebmp-bootstrap

/**
 * Returns the associated media link, never null
 *
 * @return
 */
@Override
public Link getMediaLink()
{
  if (mediaLink == null)
  {
    setMediaLink(new Link(STRING_HASH), true);
  }
  return mediaLink;
}
origin: com.jwebmp.jre11/jwebmp-core

/**
 * Creates a link directly to the address in the specified target frame
 * <p>
 *
 * @param directToAddress
 *         The address to redirect to
 * @param targetFrameName
 *         The frame to redirect
 * @param text
 *         Includes raw text in the link
 */
public Link(String directToAddress, String targetFrameName, String text)
{
  super("a", ComponentTypes.Link);
  this.directToAddress = directToAddress;
  this.targetFrameName = targetFrameName;
  if (directToAddress != null)
  {
    addAttribute(LinkAttributes.HRef, directToAddress);
  }
  if (targetFrameName != null)
  {
    addAttribute(LinkAttributes.Target, targetFrameName);
  }
  setText(text);
}
origin: com.jwebmp/jwebmp-jquery-ui

/**
 * Creates a new theme pack item with the given values
 *
 * @param name
 * @param cssClass
 * @param iconImageLocation
 */
public ThemePackItem(String name, String cssClass, String iconImageLocation)
{
  this.name = name;
  this.cssClass = cssClass;
  this.iconImageLocation = iconImageLocation;
  link = new Link(cssClass);
  add(link);
  if (iconImageLocation != null && !iconImageLocation.isEmpty())
  {
    image = new Image(iconImageLocation);
    add(image);
  }
  span = new Span();
  span.addClass("themeName");
  span.setText(this.name);
  addClass(JQUIThemeBlocks.UI_Widget.toString());
  addClass(JQUIThemeBlocks.UI_Widget_Input.toString());
  addClass(JQUIThemeBlocks.UI_State_Active.toString());
  link.add(span);
}
origin: com.jwebmp.jre10/jwebmp-core

/**
 * Sets the address to direct to
 * <p>
 *
 * @param directToAddress
 */
@SuppressWarnings("unchecked")
@NotNull
public J setDirectToAddress(String directToAddress)
{
  this.directToAddress = directToAddress;
  addAttribute(LinkAttributes.HRef, directToAddress);
  return (J) this;
}
origin: com.jwebmp.jre11/jwebmp-bootstrap

mediaLink.add(getMediaComponent());
getChildren().remove(this.mediaLink);
this.mediaLink = null;
  this.mediaLink.addClass(BSComponentMediaOptions.Media_Left);
  this.mediaLink.addClass(BSComponentMediaOptions.Media_Right);
origin: com.jwebmp.jre11/jwebmp-bootstrap

/**
 * Sets the component displayed to the left or right (set that in the link)
 *
 * @param mediaComponent
 *
 * @return
 */
@Override
public BSMedia setMediaComponent(Component mediaComponent)
{
  if (this.mediaComponent != null)
  {
    getMediaLink().remove(this.mediaComponent);
    this.mediaComponent = null;
  }
  this.mediaComponent = mediaComponent;
  if (this.mediaComponent != null)
  {
    this.mediaComponent.addClass(BSComponentMediaOptions.Media_Object);
    getMediaLink().add(this.mediaComponent);
  }
  return this;
}
origin: com.jwebmp.jre11/jwebmp-bootstrap4

/**
 * Adds a new list item (tab header that matches the right card-body) to the header with the given active property
 *
 * @param text
 * @param active
 *
 * @return
 */
@NotNull
public ListItem<?> addItem(String text, boolean active)
{
  ListItem<?> item = new ListItem<>();
  item.addClass(BSNavsOptions.Nav_Item);
  Link<?> link = new Link<>(StaticStrings.STRING_HASH);
  link.addClass(BSNavsOptions.Nav_Link);
  if (active)
  {
    link.addClass(BSNavsOptions.Active);
  }
  link.setText(text);
  item.add(link);
  add(item);
  return item;
}
com.jwebmp.core.base.htmlLink

Javadoc

Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

The a tag is supported in all major browsers. Definition and Usage

The a tag defines a hyperlink, which is used to link from one page to another.

The most important attribute of the a element is the href attribute, which indicates the link’s destination.

By default, links will appear as follows in all browsers:

An unvisited link is underlined and blue A visited link is underlined and purple An active link is underlined and red

Tips and Notes

Tip: The following attributes: hreflang, media, rel, target, and type cannot be present if the href attribute is not present.

Tip: A linked page is normally displayed in the current browser window, unless you specify another target.

Tip: Use CSS to style links. Differences Between HTML 4.01 and HTML5

In HTML 4.01, the a tag could be either a hyperlink or an anchor. In HTML5, the a tag is always a hyperlink, but if it has no href attribute, it is only a placeholder for a hyperlink.

HTML5 has some new attributes, and some HTML 4.01 attributes are no longer supported.

Most used methods

  • <init>
    Creates a link directly to the address in the specified target frame
  • add
  • addAttribute
  • equals
  • hashCode
  • setText
  • addClass
  • preConfigure
  • remove
  • setDirectToAddress
    Sets the address to direct to

Popular in Java

  • Reactive rest calls using spring rest template
  • putExtra (Intent)
  • startActivity (Activity)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • Rectangle (java.awt)
    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
  • Kernel (java.awt.image)
  • BigDecimal (java.math)
    An immutable arbitrary-precision signed decimal.A value is represented by an arbitrary-precision "un
  • TreeMap (java.util)
    Walk the nodes of the tree left-to-right or right-to-left. Note that in descending iterations, next
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
  • Top Sublime Text 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