01: /*
02: * Copyright 2000,2005 wingS development team.
03: *
04: * This file is part of wingS (http://wingsframework.org).
05: *
06: * wingS is free software; you can redistribute it and/or modify
07: * it under the terms of the GNU Lesser General Public License
08: * as published by the Free Software Foundation; either version 2.1
09: * of the License, or (at your option) any later version.
10: *
11: * Please see COPYING for the complete licence.
12: */
13: package org.wings.style;
14:
15: import org.wings.SComponent;
16: import org.wings.SFrame;
17:
18: import java.io.Serializable;
19:
20: /**
21: * A selector string. A selector address some part of a component.
22: * For example the content of a tabbed pane ..
23: */
24: public class Selector implements Serializable {
25:
26: /**
27: * We address a specific area of the component. For example the content of a tabbed pane ..
28: */
29: protected String selector;
30:
31: /**
32: * @param selectorString
33: */
34: public Selector(String selectorString) {
35: this .selector = selectorString;
36: }
37:
38: /**
39: * @return An valid CSS selection expression.
40: */
41: public String getSelector() {
42: return selector;
43: }
44:
45: @Override
46: public boolean equals(Object o) {
47: if (this == o)
48: return true;
49: if (o == null || getClass() != o.getClass())
50: return false;
51:
52: final Selector selector1 = (Selector) o;
53:
54: if (selector != null ? !selector.equals(selector1.selector)
55: : selector1.selector != null)
56: return false;
57:
58: return true;
59: }
60:
61: @Override
62: public int hashCode() {
63: return (selector != null ? selector.hashCode() : 0);
64: }
65: }
|