com.levigo.jadice.swing.tool
Class DecorationTool

java.lang.Object
  extended by com.levigo.jadice.swing.tool.Tool
      extended by com.levigo.jadice.swing.tool.DecorationTool
All Implemented Interfaces:
MenuContributor

public class DecorationTool
extends Tool

This tool is used to apply page decorations. It allows the usage of DecorationRenderer on any ViewComponents. Therefore it bridges Tool.render(RenderParameters, boolean) calls to a contained DecorationRenderer. If no renderer is set to this by a call of setRenderer(DecorationRenderer), this tool will do nothing.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.levigo.jadice.swing.tool.Tool
Tool.ActivationRequest
 
Field Summary
 
Fields inherited from class com.levigo.jadice.swing.tool.Tool
DEFAULT_PRIORITY, MAX_PRIORITY, MIN_PRIORITY
 
Constructor Summary
DecorationTool()
          Constructor
 
Method Summary
 DecorationRenderer getRenderer()
          Returns the decoration renderer to which this Tool.render(RenderParameters, boolean) calls are bridged to DecorationRenderer.decorate(com.levigo.jadice.document.render.BasicRenderParameters) calls.
protected  void render(RenderParameters parameters, boolean isActive)
          Renders the Tool's UI onto the given Graphics2D context using the given RenderControls.
 void setRenderer(DecorationRenderer renderer)
          Changes the decoration renderer which is used by this too
 
Methods inherited from class com.levigo.jadice.swing.tool.Tool
contribute, getActivationFeedback, getActivationRequest, getActivationRequestForKeyPressed, getActivationRequestForMouseDragged, getActivationRequestForMousePressed, getCursor, getDispatchPriority, getManager, getRenderPriority, handleEditEvent, handleKeyPressed, handleKeyReleased, handleKeyTyped, handleMouseClicked, handleMouseDragged, handleMouseEntered, handleMouseExited, handleMouseMoved, handleMousePressed, handleMouseReleased, handleMouseWheelMoved, propagatePropertyChange, setActive, setCursor, setEnabled, setManager, setStatusFeedback
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DecorationTool

public DecorationTool()
Constructor

Method Detail

render

protected void render(RenderParameters parameters,
                      boolean isActive)
Description copied from class: Tool
Renders the Tool's UI onto the given Graphics2D context using the given RenderControls.

This render method is called within the context and during the rendering of a single page. The page being rendered is passed to implementors of this method in order to be able to control and influence the page rendering.

Overrides:
render in class Tool
Parameters:
parameters - the view component which is currently being rendered
isActive - whether the called tool is currently active

getRenderer

public DecorationRenderer getRenderer()
Returns the decoration renderer to which this Tool.render(RenderParameters, boolean) calls are bridged to DecorationRenderer.decorate(com.levigo.jadice.document.render.BasicRenderParameters) calls.

Returns:
DecorationRenderer or null if no renderer is available
See Also:
setRenderer(DecorationRenderer)

setRenderer

public void setRenderer(DecorationRenderer renderer)
Changes the decoration renderer which is used by this too

Parameters:
renderer -
See Also:
getRenderer()


Copyright © 1995-2020 levigo holding gmbh. All Rights Reserved.