net.ctdp.rfdynhud.widgets.internal
Class InternalWidget

java.lang.Object
  extended by net.ctdp.rfdynhud.widgets.base.widget.Widget
      extended by net.ctdp.rfdynhud.widgets.internal.InternalWidget
All Implemented Interfaces:
java.lang.Cloneable, PropertiesKeeper

public class InternalWidget
extends Widget

This Widget displays information, if something went wrong or the plugin is in beta state or something.

Author:
Marvin Froehlich (CTDP)

Field Summary
 
Fields inherited from class net.ctdp.rfdynhud.widgets.base.widget.Widget
LOG_CHANNEL, NEEDED_DATA_ALL, NEEDED_DATA_SCORING, NEEDED_DATA_TELEMETRY
 
Constructor Summary
InternalWidget()
           
 
Method Summary
protected  void drawWidget(Clock clock, boolean needsCompleteRedraw, LiveGameData gameData, boolean isEditorMode, TextureImage2D texture, int offsetX, int offsetY, int width, int height)
          This method must contain the actual drawing code for this Widget.
 void getProperties(PropertiesContainer propsCont, boolean forceAll)
          Puts all editable properties to the editor.
protected  void initialize(LiveGameData gameData, boolean isEditorMode, DrawnStringFactory drawnStringFactory, TextureImage2D texture, int width, int height)
          This method is called once to initialized DrawnStrings used on this Widget.
protected  void initSubTextures(LiveGameData gameData, boolean isEditorMode, int widgetInnerWidth, int widgetInnerHeight, SubTextureCollector collector)
          Gets the TransformableTextures, that this Widget keeps.
 void setMessage(java.lang.String... message)
           
 
Methods inherited from class net.ctdp.rfdynhud.widgets.base.widget.Widget
addBackgroundPropertyToContainer, addBorderPropertyToContainer, addFontPropertiesToContainer, addPaddingPropertiesToContainer, addPositionAndSizePropertiesToContainer, addTypeAndNamePropertiesToContainer, addVisibilityPropertiesToContainer, afterConfigurationLoaded, bake, beforeConfigurationCleared, canHaveBackground, canHaveBorder, checkForChanges, clearBackgroundRegion, clearRegion, clearRegion, clone, cloneProperty, debug, debugCS, drawBackground, drawBorder, drawWidget, forceAndSetDirty, forceCompleteRedraw, forceReinitialization, getAbsoluteOffsetX, getAbsoluteOffsetY, getAutoVisibility, getBackground, getBackgroundProperty, getBorder, getBorderProperty, getConfiguration, getDefaultBorderValue, getDefaultNamedColorValue, getDefaultNamedFontValue, getDirtyFlag, getDocumentationSource, getDrawnStringFactory, getEffectiveHeight, getEffectiveWidth, getFont, getFontColor, getFontColorProperty, getFontProperty, getInitialBackground, getInnerSize, getInputActions, getInputVisibility, getMasterWidget, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getName, getNeededData, getNewInstanceForClone, getOffsetXToRootMasterWidget, getOffsetYToRootMasterWidget, getPaddingBottom, getPaddingLeft, getPaddingPropertyBottom, getPaddingPropertyLeft, getPaddingPropertyRight, getPaddingPropertyTop, getPaddingRight, getPaddingTop, getPosition, getPropertiesForParentGroup, getPropertiesIterator, getSize, getSubTextures, getUpdatedVisibility, getWidgetController, getWidgetPackage, getWidgetSet, getZIndex, hasBorder, hasFixedSize, hasMasterCanvas, hasText, isFontAntiAliased, isVisible, loadProperty, log, log, logCS, logCS, onBackgroundChanged, onBoundInputStateChanged, onCanvasSizeChanged, onCompleteRedrawForced, onDirtyFlagSet, onGarageEntered, onGarageExited, onLapStarted, onNeededDataComplete, onPitsEntered, onPitsExited, onPositionChanged, onPropertyChanged, onRealtimeEntered, onRealtimeExited, onReinitializationForced, onScoringInfoUpdated, onSessionStarted, onSizeChanged, onTrackChanged, onVehicleControlChanged, onVehicleSetupUpdated, onVisibilityChanged, prepareForMenuItem, saveProperties, setAllPosAndSizeToPercents, setAllPosAndSizeToPixels, setDirtyFlag, setName, setPadding, setWidgetController, setZIndex, updateVisibility, visibilityChangedSinceLastDraw
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InternalWidget

public InternalWidget()
Method Detail

setMessage

public void setMessage(java.lang.String... message)

initSubTextures

protected void initSubTextures(LiveGameData gameData,
                               boolean isEditorMode,
                               int widgetInnerWidth,
                               int widgetInnerHeight,
                               SubTextureCollector collector)
Gets the TransformableTextures, that this Widget keeps.

Specified by:
initSubTextures in class Widget
Parameters:
gameData - the live game data
isEditorMode - rendering in the editor?
widgetInnerWidth - the total widget width excluding borders
widgetInnerHeight - the total widget height excluding borders
collector - the collector to collect all the sub textures

initialize

protected void initialize(LiveGameData gameData,
                          boolean isEditorMode,
                          DrawnStringFactory drawnStringFactory,
                          TextureImage2D texture,
                          int width,
                          int height)
Description copied from class: Widget
This method is called once to initialized DrawnStrings used on this Widget.

Specified by:
initialize in class Widget
Parameters:
gameData - the live game data
isEditorMode - true, if the Editor is used for rendering instead of rFactor
drawnStringFactory - a factory to get DrawnString instances from
texture - the texture image to draw on. Use TextureImage2D.getTextureCanvas() to retrieve the Texture2DCanvas for Graphics2D drawing.
width - the width on the texture
height - the height on the texture

drawWidget

protected void drawWidget(Clock clock,
                          boolean needsCompleteRedraw,
                          LiveGameData gameData,
                          boolean isEditorMode,
                          TextureImage2D texture,
                          int offsetX,
                          int offsetY,
                          int width,
                          int height)
Description copied from class: Widget
This method must contain the actual drawing code for this Widget.

Specified by:
drawWidget in class Widget
Parameters:
clock - this is a clock for very dynamic content, that needs smooth display. If 'needsCompleteRedraw' is true, clock1 is also true.
needsCompleteRedraw - whether this widget needs to be completely redrawn (true) or just the changed parts (false)
gameData - the live game data
isEditorMode - true, if the Editor is used for rendering instead of rFactor
texture - the texture image to draw on. Use TextureImage2D.getTextureCanvas() to retrieve the Texture2DCanvas for Graphics2D drawing.
offsetX - the x-offset on the texture
offsetY - the y-offset on the texture
width - the width on the texture
height - the height on the texture

getProperties

public void getProperties(PropertiesContainer propsCont,
                          boolean forceAll)
Description copied from class: Widget
Puts all editable properties to the editor.

Specified by:
getProperties in interface PropertiesKeeper
Overrides:
getProperties in class Widget
Parameters:
propsCont - the container to add the properties to
forceAll - If true, all properties provided by this PropertiesKeeper must be added. If false, only the properties, that are relevant for the current PropertiesKeeper's situation have to be added, some can be ignored.