input
stringlengths
10
828
output
stringlengths
5
107
public form create form composite parent form form content new form parent orientation form content set background colors get background form content set foreground colors get color form colors title colors initialize section tool bar colors form content set separator color colors get color form colors tb border form content set font jface resources get header font return form content
creates a form widget in the provided parent
public boolean get focus return has focus
test for focus
public scrolled page book create page book composite parent int style scrolled page book book new scrolled page book parent style orientation adapt book true true book set menu parent get menu return book
creates a scrolled page book widget as a part of the form
public boolean is loading return false
test if the widget is currently processing the text it is about to
public void dispose if colors is shared false colors dispose colors null bold font holder dispose
disposes the toolkit
public hyperlink group get hyperlink group return hyperlink group
returns the hyperlink group that manages hyperlinks for this toolkit
public void set background color bg hyperlink group set background bg colors set background bg
sets the background color for the entire toolkit
public void refresh hyperlink colors hyperlink group initialize default foregrounds colors get display
refreshes the hyperlink colors by loading from jface settings
public void paint borders for composite parent if border style swt border return if border painter null border painter new border painter parent add paint listener border painter
paints flat borders for widgets created by this toolkit within the
public void set paragraphs separated boolean value paragraphs separated value
if paragraphs are separated spacing will be added between them
public form colors get colors return colors
returns the colors used by this toolkit
public boolean get paragraphs separated return paragraphs separated
tests if there is some inter paragraph spacing
public void set border style int style this border style style
sets the border style to be used when creating widgets
public void set image string key image image resource table put i key image non nls 1
registers the image referenced by the provided key
public void set color string key color color string full key c key non nls 1 if color null resource table remove full key else resource table put full key color
registers the color referenced by the provided key
public void set font string key font font string full key f key non nls 1 if font null resource table remove full key else resource table put full key font model clear cache full key
registers the font referenced by the provided key
public void set control string key control control string full key o key non nls 1 if control null resource table remove full key else resource table put full key control
registers the control referenced by the provided key
public void set menu menu menu super set menu menu head set menu menu body set menu menu
passes the menu to the form body
public void set foreground color fg super set foreground fg head set foreground fg body set foreground fg
sets the foreground color of the form
public void set background color bg super set background bg head set background bg body set background bg
sets the background color of the form
public void set font font font super set font font head set font font
sets the font of the header text
public void set image image image head set image image layout redraw
sets the image to be rendered to the left of the title
public void set text string text boolean parse tags boolean expand urls dispose resource table false entered null if parse tags model parse tagged text text expand urls else model parse regular text text expand urls hook control segment focus layout redraw
sets the provided text
public image get background image return head get background image
returns the optional background image of the form head
public void set background image image background image head set background image background image
sets the optional background image to be rendered behind the title
public void set contents input stream is boolean expand urls entered null dispose resource table false model parse input stream is expand urls hook control segment focus layout redraw
sets the contents of the stream
public composite get head return head
returns the container that occupies the head of the form the form area
public control get head client return head get head client
returns the optional head client if set
public void set head client control head client head set head client head client layout
sets the optional head client
public composite get body return body
returns the container that occupies the body of the form the form area
public void set background image tiled boolean background image tiled head set background image tiled background image tiled
sets whether the header background image is repeated to cover the entire
public int get background image alignment return head get background image alignment
returns the background image alignment
public void set background image alignment int background image alignment
sets the background image alignment
public boolean is background image clipped return true
tests if background image is clipped
public void set background image clipped boolean background image clipped
sets whether the background image is clipped
public boolean is separator visible return head is separator visible
tests if the form head separator is visible
public void set separator visible boolean add separator head set separator visible add separator
if set adds a separator between the head and body
public void set separator color color separator color head set separator color separator color
sets the color to be used to render the optional head separator
public void set message string message head set message message
sets the message for this form
public void set whitespace normalized boolean value model set whitespace normalized value
controls whether whitespace inside paragraph and list items is
public boolean is whitespace normalized return model is whitespace normalized
tests whether whitespace inside paragraph and list item is normalized
public void set menu menu menu menu current menu super get menu if current menu null internal menu equals current menu get data internal menu set if menu null current menu dispose super set menu menu else super set menu menu
disposes the internal menu if created and sets the menu provided as a
public void set background color bg super set background bg if get expansion style title bar 0 if text label null text label set background bg if toggle null toggle set background bg
sets the background of all the custom controls in the expandable
public void set foreground color fg super set foreground fg if text label null text label set foreground fg if toggle null toggle set foreground fg
sets the foreground of all the custom controls in the expandable
public void set toggle color color c if toggle null toggle set decoration color c
sets the color of the toggle control
public void set active toggle color color c if toggle null toggle set hover decoration color c
sets the active color of the toggle control when the mouse enters the
public hyperlink settings get hyperlink settings return model get hyperlink settings
returns the hyperlink settings that are in effect for this control
public void set font font font super set font font if text label null text label set font font if toggle null toggle set font font
sets the fonts of all the custom controls in the expandable
public void set hyperlink settings hyperlink settings settings model set hyperlink settings settings
sets the hyperlink settings to be used for this control
public void set client control client assert is true client null client get parent equals this this client client
sets the client of this expandable composite
public control get client return client
returns the current expandable client
public void set text string title if text label instanceof label label text label set text title else if text label instanceof hyperlink hyperlink text label set text title
sets the title of the expandable composite
public string get text if text label instanceof label return label text label get text else if text label instanceof hyperlink return hyperlink text label get text else return non nls 1
returns the title string
public int get expansion style return expansion style
returns the bitwise ored style bits for the expansion control
public void set decoration color color decoration color this decoration color decoration color
sets the color of the decoration
public void set expanded boolean expanded internal set expanded expanded if toggle null toggle set expanded expanded
programmatically changes expanded state
public color get decoration color return decoration color
returns the color of the decoration
public void set hover decoration color color hover color this hover color hover color
sets the hover color of decoration
public color get hover decoration color return hover color
returns the hover color of the decoration
public color ge hover decoration color return hover color
returns the hover color of the decoration
public point compute size int w hint int h hint boolean changed int width height if w hint swt default width w hint else width inner width 2 margin width if h hint swt default height h hint else height inner height 2 margin height return new point width height
computes the size of the control
public void set expanded boolean expanded this expanded expanded redraw
sets the expansion state of the twistie control
protected void internal set expanded boolean expanded if this expanded expanded this expanded expanded if get description control null get description control set visible expanded if client null client set visible expanded layout
performs the expansion state change for the expandable control
public void add expansion listener iexpansion listener listener if listeners contains listener listeners add listener
adds the listener that will be notified when the expansion state changes
public void remove expansion listener iexpansion listener listener if listeners contains listener listeners remove listener
removes the expansion listener
public hyperlink get last activated return last activated
returns the link that has been active the last or code null code
public void set foreground color fg super set foreground fg if links null for int i 0 i links size i hyperlink label hyperlink links get i label set foreground fg
sets the group foreground and also sets the background of all the
public void set hyperlink underline mode int mode super set hyperlink underline mode mode if links null for int i 0 i links size i hyperlink label hyperlink links get i label set underlined mode underline always
sets the hyperlink underline mode
public int compare object s1 object s2 return string s1 compare to string s2
compares string s1 to string s2
public boolean can copy return sel data null sel data can copy
tests if the text is selected and can be copied into the clipboard
public void initialize default foregrounds display display color fg jface colors get hyperlink text display color afg jface colors get active hyperlink text display if fg null fg display get system color swt color blue set foreground fg set active foreground afg
initializes the hyperlink foregrounds from the jface defaults set for the
public color get active background return active background
returns the background to use for the active hyperlink
public color get active foreground return active foreground
returns the foreground to use for the active hyperlink
public cursor get busy cursor return forms resources get busy cursor
returns the cursor to use when the hyperlink is active
public cursor get text cursor return forms resources get text cursor
returns the cursor to use when over text
public cursor get hyperlink cursor return forms resources get hand cursor
returns the cursor to use when hovering over the hyperlink
public int get hyperlink underline mode return hyperlink underline mode
returns the underline mode to be used for all the hyperlinks in this
public void set active background color new active background active background new active background
sets the new active hyperlink background for all the links
public void set active foreground color new active foreground active foreground new active foreground
sets the new active hyperlink foreground for all the links
public void set background color new background background new background
sets the new hyperlink background for all the links
public void set foreground color new foreground foreground new foreground
sets the new hyperlink foreground for all the links
public void set hyperlink underline mode int mode hyperlink underline mode mode
sets the new hyperlink underline mode for all the links in this group
public void link entered hyperlink event e
sent when the link is entered
public void link exited hyperlink event e
sent when the link is exited
public void link activated hyperlink event e
sent when the link is activated
public void expansion state changing expansion event e
sent when the link is entered
public void expansion state changed expansion event e
sent when the link is exited
public object get href return this data
the hyperlink reference that will be followed when the hyperlink is
public boolean get state return data equals boolean true true false
returns the new expansion state of the widget
protected control get description control return null
returns description control that will be placed under the title if
public object get selected link href ihyperlink segment link get selected link return link null link get href null
returns the reference of the hyperlink that currently has keyboard focus
protected control get separator control return null
returns the separator control that will be placed between the title and
protected void set message string message if message null this message non nls 1 else this message message
sets the message
public point compute size int w hint int h hint boolean changed check widget point size expandable layout layout expandable layout get layout if w hint swt default h hint swt default size layout compute size this w hint h hint changed else size new point w hint h hint rectangle trim compute trim 0 0 size x size y return new point trim width trim height
computes the size of the expandable composite
protected void initialize background display get system color swt color list background foreground display get system color swt color list foreground initialize color table update border color
initializes the colors
protected void initialize color table create title color create twistie colors create color separator get color title get rgb rgb border rgb get system color swt color title inactive background gradient create color border blend border rgb black 80
allocates colors for the following keys border composite separator and
public string get selected link text ihyperlink segment link get selected link return link null link get text null
returns the text of the hyperlink that currently has keyboard focus or
public void initialize section tool bar colors if get color form colors tb bg null return create title bar gradient colors create title bar outline colors
allocates colors for the section tool bar all the keys that start with
public rgb get system color int code return get display get system color code get rgb
returns the rgb value of the system color represented by the code
public color create color string key rgb rgb return create color key rgb red rgb green rgb blue
creates the color for the specified key using the provided rgb object