All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.google.gwt.user.client.ui.HasAutoHorizontalAlignment Maven / Gradle / Ivy

Go to download

Vaadin is a web application framework for Rich Internet Applications (RIA). Vaadin enables easy development and maintenance of fast and secure rich web applications with a stunning look and feel and a wide browser support. It features a server-side architecture with the majority of the logic running on the server. Ajax technology is used at the browser-side to ensure a rich and interactive user experience.

There is a newer version: 8.27.1
Show newest version
/*
 * Copyright 2010 Google Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
 * use this file except in compliance with the License. You may obtain a copy of
 * the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations under
 * the License.
 */
package com.google.gwt.user.client.ui;

/**
 * A widget that implements this interface can be configured to be aligned
 * according to its contents' direction, in addition to the static alignment
 * options offered by {@link HasHorizontalAlignment}.
 */
public interface HasAutoHorizontalAlignment extends HasHorizontalAlignment {

  /**
   * Specifies that the widget's contents should be aligned left for LTR
   * content, right for RTL content, and if the content's direction is DEFAULT,
   * like {@link #ALIGN_LOCALE_START}.
   */
  AutoHorizontalAlignmentConstant ALIGN_CONTENT_START =
      new AutoHorizontalAlignmentConstant();

  /**
   * Specifies that the widget's contents should be aligned right for LTR
   * content, left for RTL content, and if the content's direction is DEFAULT,
   * like {@link #ALIGN_LOCALE_END}.
   */
  AutoHorizontalAlignmentConstant ALIGN_CONTENT_END =
      new AutoHorizontalAlignmentConstant();
  
  /**
   * Gets the horizontal auto-alignment setting. This may be one of the
   * auto-alignment values above that depend on content direction (e.g.
   * {@link HasAutoHorizontalAlignment#ALIGN_CONTENT_START}), or one of the
   * "static" {@link HasHorizontalAlignment.HorizontalAlignmentConstant}
   * alignment values (e.g. {@link HasHorizontalAlignment#ALIGN_LOCALE_START}).
   * It may be set by either {@code setAutoHorizontalAlignment} or {@code
   * HasHorizontalAlignment#setHorizontalAlignment}. The default is null,
   * indicating that no specific horizontal alignment has been set, allowing it
   * to be determined by the usual HTML and CSS mechanisms.
   *
   * @return the current automatic horizontal alignment policy.
   */
  AutoHorizontalAlignmentConstant getAutoHorizontalAlignment();

  /**
   * Sets the horizontal alignment, allowing in addition to the "static"
   * {@link HasHorizontalAlignment.HorizontalAlignmentConstant} values, the
   * "automatic" {@link HasHorizontalAlignment.AutoHorizontalAlignmentConstant}
   * values that depend on the content direction. Determines the values returned
   * by both {@link #getAutoHorizontalAlignment} and
   * {@link HasHorizontalAlignment#getHorizontalAlignment()}.
   * 

For the {@code ALIGN_CONTENT_START} and {@code ALIGN_CONTENT_END} * values, sets the horizontal alignment (including the value of {@code * HasHorizontalAlignment#getHorizontalAlignment()}) to the start or end edge * of the current content's direction, respectively, and continues to * automatically update it whenever the content direction changes. *

For other values, operates like {@link #setHorizontalAlignment}. *

For {@code null}, the horizontal alignment is cleared, allowing it to * be determined by the standard HTML mechanisms such as inheritance and CSS * rules. * @see HasHorizontalAlignment * * @param autoHorizontalAlignment the new automatic horizontal alignment * policy */ void setAutoHorizontalAlignment(AutoHorizontalAlignmentConstant autoHorizontalAlignment); }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy