java-gnome version 4.1.2

org.gnome.gtk
Class StyleContext

Object
  extended by org.freedesktop.bindings.Pointer
      extended by org.freedesktop.bindings.Proxy
          extended by org.gnome.glib.Object
              extended by org.gnome.gtk.StyleContext

public class StyleContext
extends Object

Object that contains the styling information affecting a widget. The StyleContext associated to a widget can be retrieved by using the Widget getStyleContext() method.

Since:
4.1.2
Author:
Guillaume Mazoyer

Method Summary
 void addClass(StyleClass value)
          Adds a StyleClass to StyleContext so render functions will make use of this new class for styling.
 void addRegion(StyleRegion region, RegionFlags flags)
          Adds a StyleRegion to StyleContext, so render functions will make use of this new region for styling.
 TextDirection getDirection()
          Returns the widget direction used for rendering.
 JunctionSides getJunctionSides()
          Return the sides where rendered elements connect visually with others.
 Screen getScreen()
          Returns the Screen to which this StyleContext is attached.
 StateFlags getState()
          Returns the StateFlags used when rendering.
 boolean hasClass(StyleClass value)
          Returns true if StyleContext currently has defined the given StyleClass.
 RegionFlags hasRegion(StyleRegion region)
          Returns a non-null value if StyleContext currently has defined the given StyleRegion.
 String[] listClasses()
          Returns a string array that list the classes used by this context.
 String[] listRegions()
          Returns a string array that list the regions used by this context.
 void removeClass(StyleClass value)
          Removes a StyleClass from the StyleContext.
 void removeRegion(StyleRegion region)
          Removes a StyleRegion from the StyleContext.
 void restore()
          Restores StyleContext state to a previous saved stage.
 void save()
          Saves the StyleContext state, so all modifications done through addClass(StyleClass), removeClass(StyleClass), addRegion(StyleRegion, RegionFlags), or removeRegion(StyleRegion) can be reverted in one go through restore().
 void setDirection(TextDirection direction)
          Sets the reading direction of a rendered widget.
 void setJunctionSides(JunctionSides sides)
          Sets the sides where rendered elements will visually connect with other visual elements.
 void setScreen(Screen screen)
          Sets the Screen to which this StyleContext has to be attached.
 void setState(StateFlags flags)
          Sets the StateFlags to be used when rendering.
 
Methods inherited from class org.freedesktop.bindings.Pointer
toString
 
Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

addClass

public void addClass(StyleClass value)
Adds a StyleClass to StyleContext so render functions will make use of this new class for styling.

Since:
4.1.2

addRegion

public void addRegion(StyleRegion region,
                      RegionFlags flags)
Adds a StyleRegion to StyleContext, so render functions will make use of this new region for styling.

Since:
4.1.2

getDirection

public TextDirection getDirection()
Returns the widget direction used for rendering.

Since:
4.1.2

getJunctionSides

public JunctionSides getJunctionSides()
Return the sides where rendered elements connect visually with others.

Since:
4.1.2

getScreen

public Screen getScreen()
Returns the Screen to which this StyleContext is attached.

Since:
4.1.2

getState

public StateFlags getState()
Returns the StateFlags used when rendering.

Since:
4.1.2

hasClass

public boolean hasClass(StyleClass value)
Returns true if StyleContext currently has defined the given StyleClass.

Since:
4.1.2

hasRegion

public RegionFlags hasRegion(StyleRegion region)
Returns a non-null value if StyleContext currently has defined the given StyleRegion. The returned value corresponds to the RegionFlags.

Since:
4.1.2

listClasses

public String[] listClasses()
Returns a string array that list the classes used by this context.

Since:
4.1.2

listRegions

public String[] listRegions()
Returns a string array that list the regions used by this context.

Since:
4.1.2

removeClass

public void removeClass(StyleClass value)
Removes a StyleClass from the StyleContext.

Since:
4.1.2

removeRegion

public void removeRegion(StyleRegion region)
Removes a StyleRegion from the StyleContext.

Since:
4.1.2

restore

public void restore()
Restores StyleContext state to a previous saved stage. The saved state is created when calling save().

Since:
4.1.2

save

public void save()
Saves the StyleContext state, so all modifications done through addClass(StyleClass), removeClass(StyleClass), addRegion(StyleRegion, RegionFlags), or removeRegion(StyleRegion) can be reverted in one go through restore().

Since:
4.1.2

setDirection

public void setDirection(TextDirection direction)
Sets the reading direction of a rendered widget. You generally do not have to call this method but it can be useful for test purposes.

Since:
4.1.2

setJunctionSides

public void setJunctionSides(JunctionSides sides)
Sets the sides where rendered elements will visually connect with other visual elements. Container widgets are expected to do all this work by themselves so calling this method manually shouldn't be necessary.

Since:
4.1.2

setScreen

public void setScreen(Screen screen)
Sets the Screen to which this StyleContext has to be attached.

Since:
4.1.2

setState

public void setState(StateFlags flags)
Sets the StateFlags to be used when rendering.

Since:
4.1.2


java-gnome