org.eggframework2.view.elements.xhtml
Class EventableImpl

java.lang.Object
  extended by org.eggframework2.view.elements.xhtml.EventableImpl
All Implemented Interfaces:
Attributable, IElement, Eventable

public class EventableImpl
extends java.lang.Object
implements Eventable

Author:
Jacek Olszak

Constructor Summary
EventableImpl(Eventable element)
           
 
Method Summary
 void addEventAttribute(EventType event, boolean onTheEnd, JavascriptCode code)
          [PL] Dodaje kod JavaScript do atrybutu zdarzenia w podanym miejscu.
 void addEventAttribute(EventType event, boolean onTheEnd, java.lang.String javascript)
          [PL] Dodaje kod JavaScript do atrybutu zdarzenia w podanym miejscu.
 void addEventAttribute(EventType event, JavascriptCode code)
          [PL] Dodaje kod JavaScript na końcu atrybutu zdarzenia (za średnikiem).
 void addEventAttribute(EventType event, java.lang.String javascript)
          [PL] Dodaje kod JavaScript na końcu atrybutu zdarzenia (za średnikiem).
 java.lang.String getAttribute(java.lang.String name)
          [PL] Zwraca wartość atrybutu o podanej nazwie
 java.util.Set<java.lang.String> getAttributeNames()
          [PL] Zwraca niemodyfikowalny zbiór nazw atrybutów (dodanie nowych/usunięcie istniejących nazw nie jest możliwe).
 void marshal(OutputBuilder builder)
          [PL] Szereguje swoją zawartość do obiektu OutputBuilder
 Attributable setAttribute(java.lang.String name, java.lang.String value)
          [PL] Dodaje nowy lub aktualizuje istniejący atrybut
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EventableImpl

public EventableImpl(Eventable element)
Method Detail

addEventAttribute

public void addEventAttribute(EventType event,
                              boolean onTheEnd,
                              java.lang.String javascript)
                       throws java.lang.IllegalArgumentException
Description copied from interface: Eventable
[PL] Dodaje kod JavaScript do atrybutu zdarzenia w podanym miejscu.

Specified by:
addEventAttribute in interface Eventable
Parameters:
event - [PL] Typ zdarzenia
onTheEnd - [PL] Jeśli true to kod zostanie wstawiony na końcu, za średnikiem
javascript - [PL] Kod JavaScript
Throws:
java.lang.IllegalArgumentException

addEventAttribute

public void addEventAttribute(EventType event,
                              boolean onTheEnd,
                              JavascriptCode code)
                       throws java.lang.IllegalArgumentException
Description copied from interface: Eventable
[PL] Dodaje kod JavaScript do atrybutu zdarzenia w podanym miejscu.

Specified by:
addEventAttribute in interface Eventable
Parameters:
event - [PL] Typ zdarzenia
onTheEnd - [PL] Jeśli true to kod zostanie wstawiony na końcu, za średnikiem
code - [PL] Kod JavaScript
Throws:
java.lang.IllegalArgumentException

addEventAttribute

public void addEventAttribute(EventType event,
                              java.lang.String javascript)
                       throws java.lang.IllegalArgumentException
Description copied from interface: Eventable
[PL] Dodaje kod JavaScript na końcu atrybutu zdarzenia (za średnikiem).

Specified by:
addEventAttribute in interface Eventable
Parameters:
event - [PL] Typ zdarzenia średnikiem
javascript - [PL] Kod JavaScript
Throws:
java.lang.IllegalArgumentException

addEventAttribute

public void addEventAttribute(EventType event,
                              JavascriptCode code)
                       throws java.lang.IllegalArgumentException
Description copied from interface: Eventable
[PL] Dodaje kod JavaScript na końcu atrybutu zdarzenia (za średnikiem).

Specified by:
addEventAttribute in interface Eventable
Parameters:
event - [PL] Typ zdarzenia średnikiem
code - [PL] Kod JavaScript
Throws:
java.lang.IllegalArgumentException

getAttribute

public java.lang.String getAttribute(java.lang.String name)
                              throws java.lang.IllegalArgumentException
Description copied from interface: Attributable
[PL] Zwraca wartość atrybutu o podanej nazwie

Specified by:
getAttribute in interface Attributable
Throws:
java.lang.IllegalArgumentException - Gdy name jest null

getAttributeNames

public java.util.Set<java.lang.String> getAttributeNames()
Description copied from interface: Attributable
[PL] Zwraca niemodyfikowalny zbiór nazw atrybutów (dodanie nowych/usunięcie istniejących nazw nie jest możliwe). Natomiast dodawanie/usuwanie kolejnych atrybutów do elementu automatycznie modyfikuje ten zbiór.

Specified by:
getAttributeNames in interface Attributable

setAttribute

public Attributable setAttribute(java.lang.String name,
                                 java.lang.String value)
                          throws java.lang.IllegalArgumentException
Description copied from interface: Attributable
[PL] Dodaje nowy lub aktualizuje istniejący atrybut

Specified by:
setAttribute in interface Attributable
Parameters:
name - [PL] Nazwa atrybutu.
value - [PL] Wartość atrybutu. Automatycznie konwertuje znaki specjalne (&, >, <, ") do encji Xhtml. Jeśli null to usuwa atrybut.
Returns:
[PL] Instancję elementu, na którym została wywołana ta metoda
Throws:
java.lang.IllegalArgumentException - [PL] Gdy nazwa jest null lub gdy nazwa atrybutu jest równa "id" i wartośc jest pustym łańcuchem tekstowym "".

marshal

public void marshal(OutputBuilder builder)
Description copied from interface: IElement
[PL] Szereguje swoją zawartość do obiektu OutputBuilder

Specified by:
marshal in interface IElement


Copyright © 2010. All Rights Reserved.