public interface

NoteInterface

com.droidux.pack.commons.widget.editor.NoteInterface
Known Indirect Subclasses

Class Overview

Represents contracts that need to be implemented by notes widgets.

Summary

XML Attributes
Attribute Name Related Method Description
dux_drawLine setShouldDrawLine(boolean) Controls whether a horizontal line should be drawn across the note widget. 
dux_drawMargin setShouldDrawMargin(boolean) Controls whether to draw a color margin on the left side of the widget. 
dux_lineColor setLineColor(int) Specifies the line color to be used if the dux_drawLine is set to true
dux_marginColor setMarginColor(int) Specifies the margin color to be used if the dux_drawMargin is set to true
dux_marginType setMarginType(int) The type of the paper color for use as background of text editing widgets. 
dux_marginWidth setMarginWidth(int) Specifies the width of the margin, if the dux_drawMargin is set to true
dux_paperColor setPaperColor(int) Specifies the paper color for use as background of text editing widgets. 
dux_paperColorType setPaperColorType(int) The type of the paper color for use as background of text editing widgets. 
Fields
public static final int MARGIN_TYPE_DOUBLE_LINE
public static final int MARGIN_TYPE_EDGE
public static final int MARGIN_TYPE_LINE
Public Methods
abstract int getLineColor()
Gets the color to use to draw the horizontal lines.
abstract int getMarginColor()
Gets the color to use to draw the colored margin.
abstract int getMarginType()
Returns the margin type.
abstract int getMarginWidth()
Gets the width of the colored margin.
abstract int getPaperColor()
Gets the base color to use to draw the background.
abstract int getPaperColorType()
Gets the type of color to use to draw the background.
abstract boolean getShouldDrawLine()
Gets whether to draw horizontal lines.
abstract boolean getShouldDrawMargin()
Gets whether to draw a colored margin.
abstract void setLineColor(int color)
Sets the color to use to draw the horizontal lines.
abstract void setMarginColor(int color)
Sets the color to use to draw the colored margin.
abstract void setMarginType(int type)
Sets the type of the margin.
abstract void setMarginWidth(int width)
Sets the width of the colored margin.
abstract void setPaperColor(int color)
Sets the base color to use to draw the background.
abstract void setPaperColorType(int type)
Sets the type of color to use to draw the background.
abstract void setShouldDrawLine(boolean draw)
Sets whether to draw horizontal lines.
abstract void setShouldDrawMargin(boolean draw)
Sets whether to draw a colored margin.

XML Attributes

dux_drawLine

Since: API Level

Controls whether a horizontal line should be drawn across the note widget. Default is true.

Must be a boolean value, either "true" or "false".

This may also be a reference to a resource (in the form "@[package:]type:name") or theme attribute (in the form "?[package:][type:]name") containing a value of this type.

Related Methods

dux_drawMargin

Since: API Level

Controls whether to draw a color margin on the left side of the widget. Default is false.

Must be a boolean value, either "true" or "false".

This may also be a reference to a resource (in the form "@[package:]type:name") or theme attribute (in the form "?[package:][type:]name") containing a value of this type.

dux_lineColor

Since: API Level

Specifies the line color to be used if the dux_drawLine is set to true. If the line color is not specified and the dux_drawLine is true, a color will be automatically calculated.

May be a reference to another resource, in the form "@[+][package:]type:name" or to a theme attribute in the form "?[package:][type:]name".

May be a color value, in the form of "#rgb", "#argb", "#rrggbb", or "#aarrggbb".

Related Methods

dux_marginColor

Since: API Level

Specifies the margin color to be used if the dux_drawMargin is set to true.

May be a reference to another resource, in the form "@[+][package:]type:name" or to a theme attribute in the form "?[package:][type:]name".

May be a color value, in the form of "#rgb", "#argb", "#rrggbb", or "#aarrggbb".

Related Methods

dux_marginType

Since: API Level

The type of the paper color for use as background of text editing widgets.

Must be one of the following constant values.

ConstantValueDescription
solid0 Use solid color.
gradient1 Use gradient color. The gradient color will be automatically created based on the color specified by the dux_paperColor attribute.

Related Methods

dux_marginWidth

Since: API Level

Specifies the width of the margin, if the dux_drawMargin is set to true. Its value should be a dimension (such as "5dip").

Must be a dimension value, which is a floating point number appended with a unit such as "2.5sp". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters).

Related Methods

dux_paperColor

Since: API Level

Specifies the paper color for use as background of text editing widgets. If the widget already has a background, the color specified by this attribute will be drawn over the background, so you might need to adjust the opacity of the color to still see the background. You can use a transparent color to not draw a color on the background.

May be a reference to another resource, in the form "@[+][package:]type:name" or to a theme attribute in the form "?[package:][type:]name".

May be a color value, in the form of "#rgb", "#argb", "#rrggbb", or "#aarrggbb".

Related Methods

dux_paperColorType

Since: API Level

The type of the paper color for use as background of text editing widgets.

Must be one of the following constant values.

ConstantValueDescription
solid0 Use solid color.
gradient1 Use gradient color. The gradient color will be automatically created based on the color specified by the dux_paperColor attribute.

Related Methods

Fields

public static final int MARGIN_TYPE_DOUBLE_LINE

Since: API Level 2.5

public static final int MARGIN_TYPE_EDGE

Since: API Level 2.5

public static final int MARGIN_TYPE_LINE

Since: API Level 2.5

Public Methods

public abstract int getLineColor ()

Since: API Level 2.5

Gets the color to use to draw the horizontal lines.

Related XML Attributes
Returns
  • The line color.

public abstract int getMarginColor ()

Since: API Level 2.5

Gets the color to use to draw the colored margin.

Related XML Attributes
Returns
  • The margin color.

public abstract int getMarginType ()

Since: API Level 2.5

Returns the margin type.

Related XML Attributes

public abstract int getMarginWidth ()

Since: API Level 2.5

Gets the width of the colored margin.

Related XML Attributes
Returns
  • The width of the margin.

public abstract int getPaperColor ()

Since: API Level 2.5

Gets the base color to use to draw the background.

Related XML Attributes
Returns
  • The color.

public abstract int getPaperColorType ()

Since: API Level 2.5

Gets the type of color to use to draw the background.

Related XML Attributes
Returns
  • The type of color. Can be solid or gradient.

public abstract boolean getShouldDrawLine ()

Since: API Level 2.5

Gets whether to draw horizontal lines.

Related XML Attributes
Returns
  • If true, horizontal lines will be drawn.

public abstract boolean getShouldDrawMargin ()

Since: API Level 2.5

Gets whether to draw a colored margin.

Related XML Attributes
Returns
  • If true, a colored margin will be drawn.

public abstract void setLineColor (int color)

Since: API Level 2.5

Sets the color to use to draw the horizontal lines.

Related XML Attributes
Parameters
color The line color.

public abstract void setMarginColor (int color)

Since: API Level 2.5

Sets the color to use to draw the colored margin.

Related XML Attributes
Parameters
color The margin color.

public abstract void setMarginType (int type)

Since: API Level 2.5

Sets the type of the margin.

Related XML Attributes
Parameters
type The margin type.

public abstract void setMarginWidth (int width)

Since: API Level 2.5

Sets the width of the colored margin.

Related XML Attributes
Parameters
width The width of the margin.

public abstract void setPaperColor (int color)

Since: API Level 2.5

Sets the base color to use to draw the background.

Related XML Attributes
Parameters
color The color.

public abstract void setPaperColorType (int type)

Since: API Level 2.5

Sets the type of color to use to draw the background.

Related XML Attributes
Parameters
type The type of color. Can be solid or gradient.

public abstract void setShouldDrawLine (boolean draw)

Since: API Level 2.5

Sets whether to draw horizontal lines.

Related XML Attributes
Parameters
draw If true, horizontal lines will be drawn.

public abstract void setShouldDrawMargin (boolean draw)

Since: API Level 2.5

Sets whether to draw a colored margin.

Related XML Attributes
Parameters
draw If true, a colored margin will be drawn.