Component PAINTAREAITEM

Overview

The PAINTAREAITEM component is a rectangular area within a PAINTAREA. The position of the item is defined by its BOUNDS attribute, which is a flexible definition of a "x;y;width;height;z" coordinate.

The PAINTAREAITEM can either be used as stand alone component itself - or you may put any component inside.

Attribute summary

Typically used attributes

All attributes are

General attributes are

Positioning

Used inside: PAINTAREA

Using inside: ACTIVEX, ADAPTIVESPLITAREA, ADAPTIVETILECONTAINER, ADAPTIVETOOLBAR, ANIMATEDPANE, ANIMATEICON, AREASELECTOR, ARRAYGRID, AUTOCOMPLETE, AVATARICON, AWESOMEFONTICON, BLOCKABLEAREA, BOX, BROWSER, BUTTON, BUTTONCOPYPASTEACTIVATION, BUTTONMENU, BUTTONPOPUP, BUTTONVERTICAL, CALENDAR, CALENDARFIELD, CAMERA, CHARTJS, CHECKBOX, CLIENTFILEEXPLORER, CLOCK, CODEEDITOR, COLDISTANCE, COLLINE, COLORFIELD, COLORICON, COLSYNCHEDPANE, COMBOBOX, COMBOFIELD, DIRECTHTMLINSERT, DRAWAREA, DYNAMICCONTENT, FIELD, FILECHOOSER, FILEDOWNLOADBUTTON, FILEDOWNLOADLINK, FILEUPLOAD, FILEUPLOADBUTTON, FILEUPLOADBUTTONASYNCHRONOUS, FILEUPLOADLINK, FILEUPLOADLINKASYNCHRONOUS, FIXGRID, FIXGRIDTOUCHBUTTON, FIXGRIDWITHGROUPING, FOLDABLEPANE, FOLDABLEPOPUPINCLUDE, FOLDABLEVERTICALPANE, FONTICON, FORMATTEDFIELD, FULLSCREENBUTTON, FXCHART, GRIDHEADERLABEL, GRIDLAYOUTPANE, HELPICON, HEXIMAGE, HEXIMAGEMAP, HIDEABLE, HYPERLINK, ICON, ICONSEPTEXT, IFRAMEINCLUDE, IMAGE, IMAGEANONYMIZER, IMAGEANONYMIZERDIRECT, IMAGEMAP, IMAGESHAKER, JRVIEWER, KEYBOARDSCANNER, KEYSELECTOR, LABEL, LABELCONTAINER, LABELMULTILINE, LABELVERTICAL, LAYEREDPANE, LINK, LINKVERTICAL, LIST, LONGTEXTFIELD, MEDIAPLAYER, MENUBAR, MULTILABEL, OSMVIEWER, OUTLOOKBAR, OVERLAYAREA, PAGEBEANCOMPONENT, PAGEBEANINCLUDE, PAINTAREA, PANE, PARENTEXIT, PARENTEXIT, PASSWORD, PDFRENDERER, PDFRENDERERVIAURL, PICKLIST, POOLEDBROWSER, PROGRESSBAR, QRCODESCANNERJSQR, RADIAL, RADIOBUTTON, RADIOBUTTONGROUP, REPEAT, REPEAT, RGRAPH, ROLLINGCONTAINERAREA, SCALEPANE, SCENEJS, SCHEDULE, SCROLLANCHOR, SCROLLBAR, SCROLLNOTIFIER, SCROLLPANE, SHIFTCONTAINER, SIMPLEHTMLEDITOR, SIZEABLEPANE, SIZEABLEPANEHORIZONTAL, SLIDECONTAINER, SLIDER, SMARTLABEL, SMARTTEXTAREA, SPANGRID, SPINNER, SPLITPANE, STABLEAREAMANAGER, STABLEAREAPLACEHOLDER, SUBPAGE, SVGVIEWER, SYSTEMICON, TABBEDLINE, TABBEDLINECONTAINER, TABBEDLINEVERTICAL, TABBEDPANE, TEXTAREA, TEXTAREAWITHCOMMENT, TEXTEDITOR, TEXTPANE, TEXTPANEVERTICAL, TEXTWITHCONTROLS, TEXTWITHLINKS, TILEDAREA, TOGGLE, TOUCHFIELD, TOUCHFIELDNUMERIC, TOUCHSELECTOR, TOUCHSIGNATURE, TOUCHVIRTUALKEYBOARD, VIDEO, WINDOWSIZER, WORKPLACEPERSPECTIVESELECTOR

Attribute details

accessiblename

Text that is passed as control content to the accessible support devices (e.g. screen readers).

actionListener

Binding to server side method that processes the events coming from this component.

#{methodBinding}Method binding

adapterbinding

Special binding to component adapter object instance on server side. The component adapter must be an instance of IComponentAdapterBinding. For some components (e.g. FIXGRID) there is an extended interface (e.g. IFIXGRIDComponentAdapterBinding).

#{tobedefined}Binding to IComponentAdapter instance

attributemacro

Name of macro that is used for generating certain attributes of this component. Please pay attention: the value of this attribute is read one time for each control and cannot be changed afterwards.

background

Background color of the component. Any RGB value can be chosen using format #rrggbb.

#FFFFFFWhite
#000000Black
#FF0000Red
#00FF00Green
#0000FFBlue
#0000FF30Blue with a transparency of x30.

bgpaint

Background paint commands. There is a sequence of paint commands which can be executed one after the other by listing them as semicolon separated list. - By appending certain suffixes to a command you can define that the command is only executed in a certain situation. Available suffixes are: _empty (content of component is empty), _focus, _nofocus, _enabled, _disabled, _mouseover. Multiple suffixes can be used in parallel (e.g. write_empty_focus).

---------- bgpaint commands for all clients -----
error()Component indicates error.
mandatory()Component indicates mandatory input. Only is shown if component does not have any content yet.
bgbackground(#FF0000)Background with one color
bgbackground(#FF0000,#0000FF,vertical)Background as gradient of two colors
bgimage(left,/images/xyz.png)Image at certain position
bgwrite(left,...text...)Text at certain position
bgwrite(left,...text...,#800000,12)Text at certain position with defined color and size
---------- bgpaint commands for Java clients -----
rectangle(0,0,100%,100%,#FF0000)Red rectangle
rectangle(20,20,100,100,#FF0000)Red rectangle from 20,20 to 120,120
rectangle(20,20,100%-40,100%-40,#FF0000)Minus absolute values is allowed after percentage definitions
rectangle(0,0,100%,100%,#FF0000,#00FF00,vertical)Rectangle with color changing from red to green in vertical direction
roundedrectangle(0,0,100%,100%,10,10,#FF0000,#00FF00,vertical)Rectangle with color changing from red to green in vertical direction
line(0,0,100%,100%,1,#00FF00)Green line crossing the whole rectangle, from coordinate 0,0 to coordinat 100%,100%, thickness of line is 1
image(0,0,/images/xyz.png,lefttop)Image output x,y,image,position (lefttop/centermiddle/rightbottom...)
image(0,0,200,100,/images/xyz.png,lefttop)Image output x,y,width,heigh,image,position (lefttop/centermiddle/rightbottom...)
scaledimage(0,0,200,100,/images/xyz.png,lefttop)Scaled image output, the width/height ration is kept while scaling : x,y,width,heigh,image,position (lefttop/centermiddle/rightbottom...)
heximage(0,0,08FF40324672849CDFE...,lefttop)Image output x,y,hexadecimal image,position (lefttop/centermiddle/rightbottom...)
heximage(0,0,200,100,08FF40324672849CDFE...,lefttop)Image output x,y,width,height,hexadecimal image,position (lefttop/centermiddle/rightbottom...)
scaledheximage(0,0,200,100,08FF40324672849CDFE...,lefttop)Scaled image output x,y,width,height,hexadecimal image,position (lefttop/centermiddle/rightbottom...)
border(0,0,100%,100%,#C0C0C0,2)Rectangular border with thickness 2
roundedborder(0,0,100%,100%,10,10,#C0C0C0,2)Rounded border with thickness 2
write(0,0,Some text,lefttop)Some text in the left top corner
write(50%,50%,Some text,20,#00FF00,centermiddle)Some text in the left center, font size 20, font color green
write(50%,50%,Some text,20,#00FF00,bold,centermiddle)Some text in the left center, font size 20, font color green,bold
write(50%,50%,Some text,20,#00FF00,italic,centermiddle)Some text in the left center, font size 20, font color green,italic
write(50%,50%,Some text,20,#00FF00,normal,centermiddle)Some text in the left center, font size 20, font color green,normal
write(0,100%,Some text,20,#00FF00,default,lefttop,90)Some text in the left bottom corner, font size 20, font color green, 90 degrees rotated
write(20,100%,Some text,20,#00FF00,default,lefttop,90,-1,1)Some text in the left bottom corner, font size 20, font color green, 90 degrees rotated. x scaling -1, y scaling 1
write(20,100%,Some text,20,#00FF00,bold,lefttop,90,-1,1)Some text in the left bottom corner, font size 20, font color green, 90 degrees rotated. x scaling -1, y scaling 1
writeifempty(0,0,Some text,lefttop)Same as write-command, but now only visible if component contains data
writeifempty(50%,50%,Some text,20,#00FF00,centermiddle)Same as write-command, but now only visible if component contains data
writemultiline(0,0,100%,100%,Some text)Some text into the defined rectangle. Only fully supported with FX client, in Swing client the text will be output as one line.
writemultiline(0,0,100%,100%,Some text,20,#FF0000,bold)Some text into the defined rectangle. In additional font size, text color and text style (normal,bold,italic) are passed. Only fully supported with FX client, in Swing client the text will be output as one line.
oval(0,0,100%,100%,#FF0000)Red ellipse
oval(0,0,100%,100%,#FF0000,#00FF00,vertical)Red ellipse with color changing from red to green
ovalborder(0,0,100%,100%,#FF0000,2)Red ellipse border, red, 2 pixels thick
grid(100,#00000020)Grid with line distance 100, black line color - with transparency
nodisabled()Switches off the automated shading of disabled input components
background(#FF0000)Sets the background of the painted area.
backgroundnofocus(#FF0000)Sets the background of the painted area - which is only drawn if the component does not hold the focus.
repeatimage(/images/xyz.png)The image is repeated and drawn all over the available space.

border

Defintion of border of control. Either defined as straight color value, with then having a border of 1 pixel. Or: an explicit per-side definition as comma separated list of border definition values.

#8080801 pixel border in color dark gray.
top:1;color:#808080top:1;color:#808080 : border only on top, 1 pixel height, color #808080
top:1;bottom:1;left:1;right:1;color:#FF0000top:1;bottom:1;left:1;right:1;color:#FF0000 : red border of 1 pixel size
top:1;bottom:1;left:1;right:1;color:#FF0000;dashing:5,2top:1;bottom:1;left:1;right:1;color:#FF0000 : red border of 1 pixel size, dashed with segments of 5 pixesl and 2 pixels; dashing only supported with FX Client!
noborderDefines that no border is painted - esp. in cases when empty borders are normally added (e.g. in grid cells)

bounds

Position and size of a component. Format: x;y;width;height;z. Width and height are optional - if undefined then the corresponding value is automatically derived. The z value is optional as well.

0;0;100;100At 0,0, width 100, height 100
0;0;100;100;10At 0,0, width 100, height 100. The z-position is 10.
0;0At 0,0 - width and height are derived from the size of the component.

boundsanchor

Anchor for positioning the component. The x/y position of the BOUNDS attribute by default is applied to the left top point of the component itself. By using the attribute BOUNDSANCHOR you may change this and explicitly set the point of the component to which the (x,y) definition is applied.

lefttopLeft top - default
centertopCenter top
righttopRight top
leftmiddleLeft middle
centermiddleCenter middle
rightmiddleRight middle
leftbottomLeft bottom
centerbottomCenter bottom
rightbottomRight bottom

clientname

Name that is assigned to the component at client side: there is no specific function associated with the name - but it can be used on client side to describe the component in a clearer way. The name is e.g. used by UI test tools that replay certain user interaction sequences - and that reference components via their name.

comment

Comment that can be asigned to any component. The comment is not operationally used.

Any textAny text

configinfo

Configuration information that is attached to this component. This information is not functionally used by CaptainCasa, but may be used for any application specific purpose.

connecteditemids

Semicolon separated list of PAINTAREAITEM-ITEMID values. If moving the current item then all connected items are moved as well.

dragroundtrip

If set to true then an event is triggered on server side when the user starts a drag operation. The event is of type BaseActionEventDragStarted.

falseNo event triggered (default)
trueEvent triggered

dragsend

Description of object that can be dragged from this component. The description consists out of a type and and id. A component may have multiple objects that can be associated.

article:4711Example: article
file:harry.txt;content:Hello world!Example: Multiple object descriptions

droprastertext

Text that is shown when dragging over the component. The text is only shown if a drop is possible (DROPRECEIVE definition).

 (default) No text shown
 pixel(5) Current drop pixel position - in steps of 5 (or any other value)
 pixelX(5) Current drop pixel position - only the x-position
 pixelY(5) Current drop pixel position - only the y-position
 percentage(5) Current drop pixel position as percentage number - in steps of 5 (or any other value)
 percentageX(5) Current drop pixel position as percentage number - only the x-position
 percentageY(5) Current drop pixel position as percentage number - only the y-position
 textX(0,left,25,middle,75,right) Text that is shown depending from percentage x-position

dropreceive

Semicolon separated list of object types that can be dropped onto this component.

articleExample: articles can be dropped
article;customerExample: articles and customers can be dropped

dropshape

enabled

Indicator if component is enabled or not.

trueComponent is enabled.
falseComponent is not enabled.

flush

Indicator if data changed in the component are transferred immediately to the server, causing a normal round trip processing from client to server.

trueFlush is done on data change.
falseNo flush. Data is transferred to server with next round trip.

focusable

Defines if the component is focusable. The default depends on the component: typical input components (field, check box, ...) are focusable by default, while typical structure components (pane, label, ...) are not focusable by default.

trueFocusable
falseNot focusable

helpid

Help id that is part of the online help management.

helpidId pointing to a server side online help file.
ccnof1helpExplicitly switching off default F1 help. This is sometimes required in case you want to explicitly react on F1-key as hotkey.

invokeevent

Client side event that triggers a server invoke.

clickMouse click (both mouse buttons)
leftclickMouse click (left mouse button)
rightclickMouse click (right mouse button)
doubleclickMouse double click
leftanyclickBoth click and double click are transferred, check event BaseActionEventInvoke on server side for click count
mousedownLeft mouse button down

itemid

Id of item - which is used to identify the item in the scope of the current PAINTAREA. The ITEMDID is used by PAINTAREAITEM-CONNECTEDIDS.

lineidsending

Semicolon-separated list of lines that end at this item. If the item is moved then the correspoding lines are moved as well.

lineidsstarting

Semicolon-separated list of lines that strat from this item. If the item is moved then the correspoding lines are moved as well.

movetofrontonmouseover

Defines if component is moved on top of other components when the mouse is moved over.

trueComponent is moved to front (default)
falseComponent is not moved to front

movingdirection

If the attribute movingenabled is true, then this attribute defines the direction in which the user can move the object.

 In any direction (default)
horizontalHorizontal direction only
verticalVertical direction only

movingenabled

Defines is the user may move the item. If true then the user can drag and drop the item to a new position - updating the bounds-property.

falseNo moving of item (default)
trueMoving of item is supported

opaque

Information if the component is transparent or opaque. If the component is transparent then certain background effects are not drilled down into the component but are execute on parent level of the component.

falseTransparent
trueOpaque (defaut)

popupmenu

Reference to the id of a POPUPMENU definition that is available either in this page or in a page that includes this page.

popupmenuloadroundtrip

If set to true, then an explicit roundtrip is triggered when the user presses the right mouse button in order to open a popup menu. As result you can define the popup menu dynamically (using DYNAMICCONTENT) and prepare the popup menu at this point of time when the user want to open it.

falseMenu is already defined in layout, no roundtrip (default)
trueMenu is dynamically created, roundtrip is triggered

reference

Reference to an outside object that is the content behind the component. E.g. a field is representing a certain field of a database table: in this case you could define the value table;column. The reference plays a siginficant role within the attributemacro management.

refOne reference
ref1;ref2Two references
ref1;ref2;ref3Three references

rendered

Flag that indicated if this component is rendered at all. If set to false then the component is not rendered - there is no component data sent to the client.

trueComponent is rendered (default)
falseComponent is not rendered

requestfocus

Indicator, by which you can control the focus to be moved into this component.

creationComponent requests focus when created.
...int value...Counter coming from server side. Please check Developers Guide.

requestfocushotkey

Hotkey definition that is used request the focus for this component. The hotkey is globally available within the corresponding dialog.

 No keyboard association (default)
ctrl-83Control key + s
alt-83Alt key + s
shift-83Shift key + s
ctrl-shift-83Control key + Shift key + s
10return
32space
37cursor left
38cursor up
39cursor right
40cursor down
33page up
34page down
36Begin
35End
27escape
127Del
65a
66b
67c
68d
69e
70f
71g
72h
73i
74j
75k
76l
77m
78n
79o
80p
81q
82r
83s
84t
85u
86v
87w
88x
89y
90z
480
491
502
513
524
535
546
557
568
579
112F1
113F2
114F3
115F4
116F5
117F6
118F7
119F8
120F9
121F10
122F11
123F12

resizingdirection

If the attribute resizingenabled is true, then this attribute defines the direction in which the user can resize the object.

 In any direction (default)
horizontalHorizontal direction only
verticalVertical direction only

resizingenabled

Enables / disables resizing of the component by the user.

trueResizing is enabled (default)
falseResizing is disabled

resizingoverrideminimumsize

In case the PAINTAREAITEM component has some content, then by default the resizing by the user respects this minimum size. If setting this attribute to true, then the component can be resized to any size - independent from the size of the content.

trueResizing does NOT respect minimum size of content
falseResizing does respect minimum size of content (default)

rounding

Rounding radius of edges of border/background. This is optical rounding - so has nothing to do with mathematical rounding...

0Straight edges
5Rounding with radius 5
10Rounding with radius 10

selected

Selection status of component. In case of a check box this is the value that is maintained by the check box.

trueSelected
falseUnselected

selectiondrilldown

If defined as true then a selection of this component will automatically select all contained objects. The attribute is only useable if SELECTIONENABLED is set to true.

falseNo drill down (default)
trueWith drill down

selectionenabled

Defines if the component can be selected. If set to true then the user may select by clicking and/or by rang selection. If select-able then the selection status is written into the property referenced by the attribute SELECTED.

falseNo selection (default)
trueWith selection

shadow

Shadow of component. The definition is done by several inner values: hoffset, voffset, blur and color.

hoffset:5;voffset:5;blur:5;color:#C0C0C0full shadow definition
color:#C0C0C0Definition only via color, rest of values is set to default values

snappingenabled

Defines if the component snaps to the snap positions defined in PAINTAREA

trueSnapping is enabled (default)
falseNo snapping to snap positions

styleseq

Style class names that are applied to this component.

stylevariant

In CaptainCasa you can define styles definitions for components. A style definition is a definition of a set of default attribute values that are applied to the component. In case you want to differenciate between different usage types of the component you can apply multiple styles - and use the stylevariant attribute to select between.

tooltip

Text that is shown as hint when the user stays with the mouse on top of the control for a while.

...anytext...Text that is displayed as tooltip.
server:trueIndicator that tooltip for the component is managed on server side. The actionListener will be invokde with events BaseActionEventTooltipStarted and BaseActionEventTooltipEnde. On server side you may implement some modeless popup in order to show some more complex tooltip
server:true;opendelay:1000Duration in milliseconds after which a tooltip event is triggered when the user moves the mouse on top of this component

withfocusevent

If set then corresponding focus events are triggered if the component gains/looses the focus.

false(default) no focus events
truewith focus events
focusgainedwith focus events but only for gaining the focus
focuslostwith focus events but only for loosing the focus