Browse Source

Removed dependencies from shared to server/client (#9278)

tags/7.0.0.beta1
Artur Signell 11 years ago
parent
commit
7d2fd844a1

+ 5
- 4
src/com/vaadin/shared/AbstractFieldState.java View File

package com.vaadin.shared; package com.vaadin.shared;


import com.vaadin.shared.ui.TabIndexState; import com.vaadin.shared.ui.TabIndexState;
import com.vaadin.ui.AbstractField;


/** /**
* Shared state for {@link AbstractField}.
* Shared state for {@link com.vaadin.ui.AbstractField}.
* *
* @author Vaadin Ltd * @author Vaadin Ltd
* @version @VERSION@ * @version @VERSION@
/** /**
* Is the field required. Required fields must filled by the user. * Is the field required. Required fields must filled by the user.
* *
* See AbstractField#isRequired() for more information.
* See {@link com.vaadin.ui.AbstractField#isRequired()} for more
* information.
* *
* @return <code>true</code> if the field is required, otherwise * @return <code>true</code> if the field is required, otherwise
* <code>false</code>. * <code>false</code>.
/** /**
* Sets the field required. Required fields must filled by the user. * Sets the field required. Required fields must filled by the user.
* *
* See AbstractField#setRequired(boolean) for more information.
* See {@link com.vaadin.ui.AbstractField#setRequired(boolean)} for more
* information.
* *
* @param required * @param required
* Is the field required. * Is the field required.

+ 2
- 3
src/com/vaadin/shared/ComponentState.java View File



import com.vaadin.shared.communication.SharedState; import com.vaadin.shared.communication.SharedState;
import com.vaadin.shared.communication.URLReference; import com.vaadin.shared.communication.URLReference;
import com.vaadin.ui.Component;


/** /**
* Default shared state implementation for UI components. * Default shared state implementation for UI components.
/** /**
* Returns the visibility state of the component. Note that this state is * Returns the visibility state of the component. Note that this state is
* related to the component only, not its parent. This might differ from * related to the component only, not its parent. This might differ from
* what {@link Component#isVisible()} returns as this takes the hierarchy
* into account.
* what {@link com.vaadin.ui.Component#isVisible()} returns as this takes
* the hierarchy into account.
* *
* @return The visibility state. * @return The visibility state.
*/ */

+ 3
- 4
src/com/vaadin/shared/Connector.java View File

import java.io.Serializable; import java.io.Serializable;


import com.vaadin.shared.communication.SharedState; import com.vaadin.shared.communication.SharedState;
import com.vaadin.terminal.gwt.client.ServerConnector;
import com.vaadin.terminal.gwt.server.ClientConnector;


/** /**
* Interface implemented by all classes that are capable of communicating with * Interface implemented by all classes that are capable of communicating with
* <p> * <p>
* No classes should implement this interface directly, client side classes * No classes should implement this interface directly, client side classes
* wanting to communicate with server side should implement * wanting to communicate with server side should implement
* {@link ServerConnector} and server side classes should implement
* {@link ClientConnector}.
* {@link com.vaadin.terminal.gwt.client.ServerConnector} and server side
* classes should implement
* {@link com.vaadin.terminal.gwt.server.ClientConnector}.
* </p> * </p>
* *
* @author Vaadin Ltd * @author Vaadin Ltd

+ 4
- 5
src/com/vaadin/shared/VBrowserDetails.java View File



import java.io.Serializable; import java.io.Serializable;


import com.vaadin.terminal.gwt.client.BrowserInfo;
import com.vaadin.terminal.gwt.server.WebBrowser;

/** /**
* Class that parses the user agent string from the browser and provides * Class that parses the user agent string from the browser and provides
* information about the browser. Used internally by {@link BrowserInfo} and
* {@link WebBrowser}. Should not be used directly.
* information about the browser. Used internally by
* {@link com.vaadin.terminal.gwt.client.BrowserInfo} and
* {@link com.vaadin.terminal.gwt.server.WebBrowser}. Should not be used
* directly.
* *
* @author Vaadin Ltd. * @author Vaadin Ltd.
* @version @VERSION@ * @version @VERSION@

+ 5
- 8
src/com/vaadin/shared/communication/SharedState.java View File

import java.io.Serializable; import java.io.Serializable;


import com.vaadin.shared.Connector; import com.vaadin.shared.Connector;
import com.vaadin.terminal.gwt.client.ServerConnector;
import com.vaadin.terminal.gwt.client.ui.AbstractComponentConnector;


/** /**
* Interface to be implemented by all shared state classes used to communicate * Interface to be implemented by all shared state classes used to communicate
* basic information about a {@link Connector} from server to client. * basic information about a {@link Connector} from server to client.
* *
* Shared state classes have to be declared in client side packages to be
* accessible both for server and client code. They can be static nested classes
* of a {@link ServerConnector}.
* Shared state classes have to be declared in shared package to be accessible
* both for server and client code.
* *
* Shared state objects are only sent from the server to the client, and any * Shared state objects are only sent from the server to the client, and any
* modifications from the client should be performed via an RPC call that * modifications from the client should be performed via an RPC call that
* arrays of these. * arrays of these.
* *
* On the client side the connector should override * On the client side the connector should override
* {@link AbstractComponentConnector#createState()} to create the correct state
* class and {@link AbstractComponentConnector#getState()} override the return
* type.
* {@link com.vaadin.terminal.gwt.client.ui.AbstractConnector#getState()} to
* return the correct state type. This automatically causes a correct state
* object to be created.
* *
* Subclasses of a {@link Connector} using shared state should also provide a * Subclasses of a {@link Connector} using shared state should also provide a
* subclass of the shared state class of the parent class to extend the state. A * subclass of the shared state class of the parent class to extend the state. A

+ 14
- 14
src/com/vaadin/shared/ui/Connect.java View File

import java.lang.annotation.Target; import java.lang.annotation.Target;


import com.vaadin.shared.Connector; import com.vaadin.shared.Connector;
import com.vaadin.terminal.gwt.server.ClientConnector;
import com.vaadin.terminal.gwt.widgetsetutils.CustomWidgetMapGenerator;
import com.vaadin.terminal.gwt.widgetsetutils.EagerWidgetMapGenerator;
import com.vaadin.terminal.gwt.widgetsetutils.LazyWidgetMapGenerator;
import com.vaadin.terminal.gwt.widgetsetutils.WidgetMapGenerator;


/** /**
* Annotation defining the server side connector that this ClientSideConnector * Annotation defining the server side connector that this ClientSideConnector
* should connect to. The value must always by a class extending * should connect to. The value must always by a class extending
* {@link ClientConnector}.
* {@link com.vaadin.terminal.gwt.server.ClientConnector}.
* <p> * <p>
* With this annotation client side Vaadin connector is marked to have a server * With this annotation client side Vaadin connector is marked to have a server
* side counterpart. The value of the annotation is the class of server side * side counterpart. The value of the annotation is the class of server side
* Depending on the used WidgetMap generator, these optional hints may be * Depending on the used WidgetMap generator, these optional hints may be
* used to define how the client side components are loaded by the browser. * used to define how the client side components are loaded by the browser.
* The default is to eagerly load all widgets * The default is to eagerly load all widgets
* {@link EagerWidgetMapGenerator}, but if the {@link WidgetMapGenerator} is
* used by the widgetset, these load style hints are respected.
* {@link com.vaadin.terminal.gwt.widgetsetutils.EagerWidgetMapGenerator},
* but if the
* {@link com.vaadin.terminal.gwt.widgetsetutils.WidgetMapGenerator} is used
* by the widgetset, these load style hints are respected.
* <p> * <p>
* Lazy loading of a widget implementation means the client side component * Lazy loading of a widget implementation means the client side component
* is not included in the initial JavaScript application loaded when the * is not included in the initial JavaScript application loaded when the
* the best of both worlds. * the best of both worlds.
* <p> * <p>
* Fine tunings to widget loading can also be made by overriding * Fine tunings to widget loading can also be made by overriding
* {@link WidgetMapGenerator} in the GWT module. Tunings might be helpful if
* the end users have slow connections and especially if they have high
* latency in their network. The {@link CustomWidgetMapGenerator} is an
* abstract generator implementation for easy customization. Vaadin package
* also includes {@link LazyWidgetMapGenerator} that makes as many widgets
* lazily loaded as possible.
* {@link com.vaadin.terminal.gwt.widgetsetutils.WidgetMapGenerator} in the
* GWT module. Tunings might be helpful if the end users have slow
* connections and especially if they have high latency in their network.
* The
* {@link com.vaadin.terminal.gwt.widgetsetutils.CustomWidgetMapGenerator}
* is an abstract generator implementation for easy customization. Vaadin
* package also includes
* {@link com.vaadin.terminal.gwt.widgetsetutils.LazyWidgetMapGenerator}
* that makes as many widgets lazily loaded as possible.
* *
* @since 6.4 * @since 6.4
* *

+ 6
- 4
src/com/vaadin/shared/ui/button/ButtonState.java View File



import com.vaadin.shared.ComponentState; import com.vaadin.shared.ComponentState;
import com.vaadin.shared.ui.TabIndexState; import com.vaadin.shared.ui.TabIndexState;
import com.vaadin.ui.Button;


/** /**
* Shared state for Button and NativeButton.
* Shared state for {@link com.vaadin.ui.Button} and
* {@link com.vaadin.ui.NativeButton}.
* *
* @see ComponentState * @see ComponentState
* *
/** /**
* Returns the key code for activating the button via a keyboard shortcut. * Returns the key code for activating the button via a keyboard shortcut.
* *
* See {@link Button#setClickShortcut(int, int...)} for more information.
* See {@link com.vaadin.ui.Button#setClickShortcut(int, int...)} for more
* information.
* *
* @return key code or 0 for none * @return key code or 0 for none
*/ */
/** /**
* Sets the key code for activating the button via a keyboard shortcut. * Sets the key code for activating the button via a keyboard shortcut.
* *
* See {@link Button#setClickShortcut(int, int...)} for more information.
* See {@link com.vaadin.ui.Button#setClickShortcut(int, int...)} for more
* information.
* *
* @param clickShortcutKeyCode * @param clickShortcutKeyCode
* key code or 0 for none * key code or 0 for none

+ 1
- 3
src/com/vaadin/shared/ui/dd/AcceptCriterion.java View File

import java.lang.annotation.RetentionPolicy; import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target; import java.lang.annotation.Target;


import com.vaadin.terminal.gwt.client.ui.dd.VAcceptCriterion;

/** /**
* An annotation type used to point the server side counterpart for client side * An annotation type used to point the server side counterpart for client side
* a {@link VAcceptCriterion} class.
* a {@link com.vaadin.terminal.gwt.client.ui.dd.VAcceptCriterion} class.
* <p> * <p>
* Annotations are used at GWT compilation phase, so remember to rebuild your * Annotations are used at GWT compilation phase, so remember to rebuild your
* widgetset if you do changes for {@link AcceptCriterion} mappings. * widgetset if you do changes for {@link AcceptCriterion} mappings.

Loading…
Cancel
Save