Visit Mozilla.org

XUL:colorpicker

出典: MDC

« XUL リファレンス HOME    [ | 属性 | プロパティ | メソッド | 関連項目 ]

ユーザが格子状のセルの一つをクリックして色を選ぶカラーパレット。

属性
disabled, color, onchange, preference, tabindex, type
プロパティ
accessibleType, color, disabled, open, tabIndex, value

[編集]

Image:XUL_REF_rgb.gif

<colorpicker type="button"/>

[編集] 属性

XUL 要素からの継承
align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortDirection, sortResource, sortResource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width

disabled
型: 真偽値
要素が無効化されているかどうかを示します。ある要素が true に設定されていたら、その要素は無効化されています。無効化された要素は通常グレイ表示のテキストで描画されます。要素が無効化されていると、ユーザのアクションには応答せず、フォーカスもあてられず、command イベントも発生しません。

color
型: color string
現在選択されている色。これはユーザが色を選択すると変更されます。このプロパティに #RRGGBB 形式で文字列を割り当てることで選択された色を変更することができます。

onchange
型: script code
onchange 属性内のコードは、要素の値が変更された時、呼び出されます。

preference
型: 要素の id
要素を対応する preference につなぎます。この属性は prefwindow 内で使用された場合のみ効果があります。preference の値は、要素の value プロパティと一致するように更新されます。

tabindex
型: 整数
要素のタブの順番。タブの順番は tab キーが押下されたときにフォーカスが移動する順番です。より大きな tabindex の値をもつ要素は、タブの遷移が後になります。

type
型: string
この属性が提供されていないときは、colorpicker が window 内に表示されます。この値が button に設定されているときは、colorpicker がボタンとして表示されます。ユーザがこのボタンをクリックすると、色を選択するためのポップアップが現れます。

[編集] プロパティ

XUL 要素からの継承
align, allowEvents, boxObject, builder, className, collapsed, contextMenu, controllers, currentItem, database, datasources, dir, flex, height, hidden, id, left, listBoxObject, maxHeight, maxWidth, menu, minHeight, minWidth, observes, ordinal, orient, pack, persist, ref, resource, statusText, style, tooltip, tooltipText, top, value, width

DOM 要素からの継承
attributes, childNodes, cloneNode, firstChild, lastChild, localName, namespaceURI, nextSibling, nodeName, nodeType, nodeValue, ownerDocument, parentNode, prefix, previousSibling, tagName

accessibleType
型: integer
要素の accessibility オブジェクトの種類を示す値。

color
型: color string
現在選択されている色。これはユーザが色を選択すると変更されます。このプロパティに #RRGGBB 形式で文字列を割り当てることで選択された色を変更することができます。

disabled
型: 真偽値
disabled 属性の値の取得と設定。

open
型: boolean
ボタン形式の colorpicker のための popup が開かれると true を返します。popup を開くには、この属性を true に設定し、閉じるには false に設定してください。

tabIndex
型: 整数
tabindex 属性の値の取得と設定。

value
型: 文字列
value 属性の値の取得と設定。

[編集] メソッド

XUL 要素からの継承
blur, click, doCommand, focus, getElementsByAttribute

DOM 要素からの継承
addEventListener, appendChild, dispatchEvent, getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getElementsByTagName, getElementsByTagNameNS, hasAttribute, hasAttributeNS, hasAttributes, hasChildNodes, insertBefore, isSupported, normalize, removeAttribute, removeAttributeNode, removeAttributeNS, removeChild, removeEventListener, replaceChild, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS

[編集] 関連項目

インタフェース
nsIDOMXULControlElement