Package totalcross.ui
Class MultiEdit
- java.lang.Object
-
- totalcross.ui.gfx.GfxSurface
-
- totalcross.ui.Control
-
- totalcross.ui.Container
-
- totalcross.ui.MultiEdit
-
- All Implemented Interfaces:
TimerListener,Scrollable,TextControl
public class MultiEdit extends Container implements Scrollable, TextControl, TimerListener
MultiEdit is an Edit with support for multiple lines. A static scrollbar is added, but disabled/enabled as needed.Here is an example showing an Edit control being used:
import totalcross.ui.*; public class MyProgram extends MainWindow { MultiEdit mEdit; public void initUI() { // the constructor method is called with the mask, the number of lines // and the vertical interval in pixel between two lines mEdit = new MultiEdit("",3,1); add(mEdit,LEFT,TOP); // add/setRect must precede setText mEdit.setText("What text you want"); // eventually } }If the MultiEdit is not editable, the user can scroll the edit a page at a time just by clicking in the middle upper or middle lower.IN MATERIAL UI, IS VERY IMPORTANT THAT THE CAPTION IS SET BEFORE ADDING THE CONTROL.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class totalcross.ui.Control
Control.TranslucentShape
-
-
Field Summary
Fields Modifier and Type Field Description booleanautoSelectIf set to true, the text will be auto-selected when the focus enters.bytecapitaliseSets the capitalise settings for this MultiEdit.java.lang.StringcaptionThe caption to draw when this Edit is empty.intcaptionColorThe caption's color.ImagecaptionIconAn optional caption's iconCaptionPresscaptionPressHandler for the CaptionPressprotected java.lang.StringBuffercharsbooleandrawDotsIf true, a dotted line appears under each row of text (on by default)protected booleaneditableprotected IntVectorfirstprotected FlickflickThe Flick object listens and performs flick animations on PenUp events when appropriate.intgapThe gap between the rows.static booleanhasCursorWhenNotEditableSet to false if you don't want the cursor to blink when the edit is not editableprotected booleanhasFocusprotected booleanimprovedGeographicalFocusSet to true if you want the control to decide whether to gain/lose focus automatically, without having to press ACTION.booleanjustifySet to true to justify the text when the MultiEdit is NOT editable.intlastInsertPosThe last insert position before this control looses focus.java.lang.StringmaskThe mask used to infer the preferred width.booleanpersistentSelectionKeep the selection persistent; otherwise, it is reset if you change the letterintrowCountUsed to set the number of rows of this MultiEdit; used as parameter to compute the preferred height.protected ScrollBarsbbooleanselectLastKeep selection of last character-
Fields inherited from class totalcross.ui.Container
alwaysEraseBackground, BACKGROUND_CYLINDRIC_SHADED, BACKGROUND_SHADED, BACKGROUND_SHADED_INV, BACKGROUND_SOLID, backgroundStyle, BORDER_LOWERED, BORDER_NONE, BORDER_RAISED, BORDER_ROUNDED, BORDER_SIMPLE, BORDER_TOP, borderColor, children, controlFound, finishedStart, ignoreOnAddAgain, ignoreOnRemove, insets, lastH, lastScreenWidth, lastW, lastX, lastY, started, tabOrder, tail, TRANSITION_CLOSE, TRANSITION_FADE, TRANSITION_NONE, TRANSITION_OPEN, TRANSITION_TIME, transitionEffect
-
Fields inherited from class totalcross.ui.Control
AFTER, alphaValue, appId, appObj, asContainer, asWindow, backColor, BEFORE, BOTTOM, BOTTOM_OF, BRIGHTER_BACKGROUND, callListenersOnAllTargets, CENTER, CENTER_OF, clearValueInt, clearValueStr, DARKER_BACKGROUND, effect, enableUpdateScreen, esce, eventsEnabled, FILL, fillColor, FIT, fm, fmH, focusHandler, focusLess, focusOnPenDown, focusTraversable, font, FONTSIZE, foreColor, height, ignoreInsets, isHighlighting, isTablet, KEEP, keepDisabled, keepEnabled, LEFT, nextTabControl, offscreen, offscreen0, onEventFirst, parent, PARENTSIZE, PARENTSIZEMAX, PARENTSIZEMIN, PREFERRED, RANGE, repositionAllowed, RIGHT, RIGHT_OF, SAME, SCREENSIZE, SCREENSIZEMAX, SCREENSIZEMIN, setFont, setH, setRel, setW, setX, setY, tempW, textShadowColor, TOP, translucentShape, transparentBackground, uiAdjustmentsBasedOnFontHeightIsSupported, uiAndroid, UICONST, uiFlat, uiHolo, uiMaterial, uiVista, visible, width, WILL_RESIZE, x, y
-
-
Constructor Summary
Constructors Constructor Description MultiEdit()Constructs a MultiEdit with 1 pixel as space between lines and with no lines.MultiEdit(int rowCount, int spaceBetweenLines)Constructor for a text Edit with a vertical scroll Bar, gap is 1 by default and control's bounds must be specified with a setRect.MultiEdit(java.lang.String mask, int rowCount, int spaceBetweenLines)Constructor for a text Edit with a vertical scroll Bar, gap is 1 by default and control's bounds must be given with a setRect.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanScrollContent(int direction, java.lang.Object target)Checks if there is room to flick this container in the given direction.voidclear()Clears the text of this control.voidcutText(int sel1, int sel2)Cuts the text on the given range.protected voiddraw(Graphics g)voidflickEnded(boolean atPenDown)Called when the flick animation is ended.booleanflickStarted()Called when the flick animation is started.MultiEditgetCopy()Returns a copy of this Edit with almost all features.int[]getCursorPos()Returns an array with the cursor positions.FlickgetFlick()Returns the current flick object.voidgetFocusableControls(Vector v)Get a list of child controls of this container which are focus candidatesbytegetKeyboardType()Returns the keyboard type of this Edit control.intgetLength()Returns the length of the text.intgetMaxLength()intgetNumberOfTextLines()Gets total number of lines in the textintgetPreferredHeight()Returns the preferred height of this control.intgetPreferredWidth()Returns the preferred width of this control.intgetScrollPosition(int direction)Returns the current position given the direction.java.lang.StringgetText()Returns the text displayed in the edit control.java.lang.StringBuffergetTextBuffer()Returns the text's buffer.ControlhandleGeographicalFocusChangeKeys(KeyEvent ke)Used by the main event loop to give the currently focused control an opportunity to act directly on the KeyEvent.booleanisEditable()Gets if the control accepts input from the uservoidmapKeys(java.lang.String from, java.lang.String to)Maps the keys in the from char array into the keys in the to char array.protected voidonBoundsChanged(boolean screenChanged)Called after a setRect.protected voidonColorsChanged(boolean colorsChanged)Called after a setEnabled, setForeColor and setBackColor and when a control has been added to a Container.voidonEvent(Event event)Called by the system to pass events to the edit control.protected voidonFontChanged()Called after a setFontvoidonPaint(Graphics g)Draws the border (if any).protected voidonWindowPaintFinished()Called after the window has finished a paint.protected voidpopPosState()voidpopupKCC()user method to popup the keyboard/calendar/calculator for this edit.protected voidpushPosState()voidrequestFocus()Sets the focus to this control.booleanscrollContent(int xDelta, int yDelta, boolean fromFlick)Performs a relative move.voidscrollToBottom()Scrolls the text to bottom.voidscrollToLine(int line)Scrolls the text to the given line.voidscrollToTop()Scrolls the tex to the top.voidsetCursorPos(int pos)Sets the cursor position, ranging from 0 to the text' length.voidsetCursorPos(int start, int end)Sets the selected text of this Edit (if start != end).voidsetEditable(boolean on)Sets if the control accepts input from the user.voidsetKeyboard(byte kbd)Used to change the default keyboard to be used with this Edit control.voidsetMaxLength(int length)Sets the desired maximum length for text entered in the Edit.voidsetRect(int x, int y, int width, int height, Control relative, boolean screenChanged)Sets the rect for this MultiEdit.voidsetScrollbarsAlwaysVisible(boolean asNeeded)Set to true to hide the vertical scrollbar when it isn't needed (instead of disabling it).voidsetText(java.lang.String s)Sets the text displayed in the edit control.voidsetText(java.lang.String s, boolean postPressed)Sets the text displayed in the edit control.voidsetValidChars(java.lang.String validCharsString)sets the valid chars that can be entered in this edit.voidtimerTriggered(TimerEvent e)A TRIGGERED event was dispatched.booleanwasScrolled()Returns true if the control was scrolled since last pen downprotected booleanwillOpenKeyboard()Returns true if this is a MultiEdit or an Edit that has a standard keyboard.-
Methods inherited from class totalcross.ui.Container
add, add, add, add, add, applyTransitionEffect, broadcastEvent, fillBackground, fillBackground, findChild, findNearestChild, findNextFocusControl, getBorderStyle, getChildren, getChildrenCount, getClientRect, getClientRect, getFirstChild, getInsets, incLastX, incLastY, initUI, isPressed, moveFocusToNextControl, moveFocusToNextEditable, onAddAgain, onRemove, onSwapFinished, paintChildren, remove, removeAll, resize, resizeHeight, resizeWidth, setBorderStyle, setEnabled, setFocusTraversable, setHighlighting, setInsets, setNextTransitionEffect, setPressColor, setPressed, swapToTopmostWindow
-
Methods inherited from class totalcross.ui.Control
_onEvent, addEnabledStateListener, addFocusListener, addGridListener, addHighlightListener, addKeyListener, addListContainerListener, addMouseListener, addMultiTouchListener, addPenListener, addPressListener, addPushNotificationListener, addTimer, addTimer, addTimerListener, addWindowListener, bringToFront, changeHighlighted, contains, drawTranslucentBackground, getAbsoluteRect, getBackColor, getEffectH, getEffectW, getEffectX, getEffectY, getEventListeners, getFont, getForeColor, getGap, getGraphics, getHeight, getNext, getParent, getParentWindow, getPos, getPressedEvent, getPrev, getRect, getSize, getTextShadowColor, getWidth, getX, getX2, getY, getY2, hadParentScrolled, hasFocus, internalSetEnabled, intXYWH, isActionEvent, isChildOf, isDisplayed, isEnabled, isInsideOrNear, isObscured, isTopMost, isVisible, isVisibleAndInside, post, postEvent, postPressedEvent, releaseScreenShot, removeEnabledStateListener, removeFocusListener, removeGridListener, removeHighlightListener, removeKeyListener, removeListContainerListener, removeMouseListener, removeMultiTouchListener, removePenListener, removePressListener, removePushNotificationListener, removeTimer, removeTimerListener, removeWindowListener, repaint, repaintNow, reposition, reposition, repositionChildren, resetSetPositions, safeRepaintNow, safeUpdateScreen, sendToBack, setBackColor, setBackForeColors, setFocusLess, setFont, setForeColor, setRect, setRect, setRect, setSet, setTextShadowColor, setTranslucent, setVisible, showTip, takeInitialScreenShot, takeScreenShot, translateFromOrigin, uiStyleChanged, updateScreen, updateTemporary
-
-
-
-
Field Detail
-
hasFocus
protected boolean hasFocus
-
editable
protected boolean editable
-
hasCursorWhenNotEditable
public static boolean hasCursorWhenNotEditable
Set to false if you don't want the cursor to blink when the edit is not editable
-
improvedGeographicalFocus
protected boolean improvedGeographicalFocus
Set to true if you want the control to decide whether to gain/lose focus automatically, without having to press ACTION.
-
lastInsertPos
public int lastInsertPos
The last insert position before this control looses focus.
-
captionPress
public CaptionPress captionPress
Handler for the CaptionPress
-
first
protected IntVector first
-
chars
protected java.lang.StringBuffer chars
-
sb
protected ScrollBar sb
-
mask
public java.lang.String mask
The mask used to infer the preferred width. Unlike the Edit class, the MultiEdit does not support real masking.
-
rowCount
public int rowCount
Used to set the number of rows of this MultiEdit; used as parameter to compute the preferred height. You must call setRect after changing this to resize the control in height.
-
capitalise
public byte capitalise
Sets the capitalise settings for this MultiEdit. Text entered will made as is, uppercase or lowercase- See Also:
Edit.ALL_NORMAL,Edit.ALL_UPPER,Edit.ALL_LOWER
-
autoSelect
public boolean autoSelect
If set to true, the text will be auto-selected when the focus enters. True by default on penless devices.
-
drawDots
public boolean drawDots
If true, a dotted line appears under each row of text (on by default)
-
gap
public int gap
The gap between the rows.
-
justify
public boolean justify
Set to true to justify the text when the MultiEdit is NOT editable. Note that this makes the text drawing a bit slower.
-
caption
public java.lang.String caption
The caption to draw when this Edit is empty. Important: the caption is NOT splitted.- See Also:
captionColor
-
captionColor
public int captionColor
The caption's color.
-
captionIcon
public Image captionIcon
An optional caption's icon
-
flick
protected Flick flick
The Flick object listens and performs flick animations on PenUp events when appropriate.
-
selectLast
public boolean selectLast
Keep selection of last character
-
persistentSelection
public boolean persistentSelection
Keep the selection persistent; otherwise, it is reset if you change the letter
-
-
Constructor Detail
-
MultiEdit
public MultiEdit()
Constructs a MultiEdit with 1 pixel as space between lines and with no lines. You must set the bounds using FILL or FIT.
-
MultiEdit
public MultiEdit(int rowCount, int spaceBetweenLines)Constructor for a text Edit with a vertical scroll Bar, gap is 1 by default and control's bounds must be specified with a setRect. Space between lines may be 0.
-
MultiEdit
public MultiEdit(java.lang.String mask, int rowCount, int spaceBetweenLines)Constructor for a text Edit with a vertical scroll Bar, gap is 1 by default and control's bounds must be given with a setRect. Space between lines may be 0. The mask is used to compute the PREFERRED width of the control. Note that the mask does not masks the input. If mask is "", the FILL width is choosen.
-
-
Method Detail
-
flickStarted
public boolean flickStarted()
Description copied from interface:ScrollableCalled when the flick animation is started.- Specified by:
flickStartedin interfaceScrollable
-
flickEnded
public void flickEnded(boolean atPenDown)
Description copied from interface:ScrollableCalled when the flick animation is ended.- Specified by:
flickEndedin interfaceScrollable- Parameters:
atPenDown- Flag indicating if the animation ended due to a pendown event.
-
canScrollContent
public boolean canScrollContent(int direction, java.lang.Object target)Description copied from interface:ScrollableChecks if there is room to flick this container in the given direction.- Specified by:
canScrollContentin interfaceScrollable- Parameters:
direction- The direction we want to flick given by one of the following constants:target- The target of the series of PEN events that triggered this flick attempt.- Returns:
- true if the container can flick in the indicated direction.
-
scrollContent
public boolean scrollContent(int xDelta, int yDelta, boolean fromFlick)Description copied from interface:ScrollablePerforms a relative move.- Specified by:
scrollContentin interfaceScrollable- Parameters:
xDelta- The relative amount of pixels to move in the X axis.yDelta- The relative amount of pixels to move in the Y axis.
-
getScrollPosition
public int getScrollPosition(int direction)
Description copied from interface:ScrollableReturns the current position given the direction. Used on page scrolls.- Specified by:
getScrollPositionin interfaceScrollable
-
mapKeys
public void mapKeys(java.lang.String from, java.lang.String to)Maps the keys in the from char array into the keys in the to char array. For example enable a 'numeric pad' on devices that has the 1 in the u character, you can use this:ed.mapKeys("uiojklnm!.","1234567890");To make sure that lowercase characters are also handled, you should also change the capitalise mode:ed.capitalise = Edit.ALL_LOWER;
If you want to disable a set of keys, use the setValidChars method. Note that mapKeys have precendence over setValidChars.- Parameters:
from- The source keys. Must have the same length ofto. Set to null to disable mapping.to- The destination keys. Must have the same length offrom- Since:
- TotalCross 1.01
- See Also:
setValidChars(String)
-
getPreferredHeight
public int getPreferredHeight()
Description copied from class:ControlReturns the preferred height of this control.- Overrides:
getPreferredHeightin classControl
-
getPreferredWidth
public int getPreferredWidth()
Description copied from class:ControlReturns the preferred width of this control.- Overrides:
getPreferredWidthin classControl
-
setMaxLength
public void setMaxLength(int length)
Sets the desired maximum length for text entered in the Edit.- Since:
- SuperWaba 2.0 beta 4
-
getMaxLength
public int getMaxLength()
-
setKeyboard
public void setKeyboard(byte kbd)
Used to change the default keyboard to be used with this Edit control. Use the constants Edit.KBD_NONE and Edit.KBD_KEYBOARD.
-
setValidChars
public void setValidChars(java.lang.String validCharsString)
sets the valid chars that can be entered in this edit. if null is passed, any char can be entered. (case insensitive).
-
getText
public java.lang.String getText()
Returns the text displayed in the edit control.- Specified by:
getTextin interfaceTextControl
-
getTextBuffer
public java.lang.StringBuffer getTextBuffer()
Returns the text's buffer. Do NOT change the buffer contents, since changing it will not affect the char widths array, thus, leading to a wrong display.- Since:
- TotalCross 1.0
-
setText
public void setText(java.lang.String s)
Sets the text displayed in the edit control.- Specified by:
setTextin interfaceTextControl
-
setText
public void setText(java.lang.String s, boolean postPressed)Sets the text displayed in the edit control.
-
setEditable
public void setEditable(boolean on)
Sets if the control accepts input from the user. Note: If set to uneditable, keyboard is disabled.
-
isEditable
public boolean isEditable()
Gets if the control accepts input from the user
-
getNumberOfTextLines
public int getNumberOfTextLines()
Gets total number of lines in the text
-
setScrollbarsAlwaysVisible
public void setScrollbarsAlwaysVisible(boolean asNeeded)
Set to true to hide the vertical scrollbar when it isn't needed (instead of disabling it). This must be done right after the constructor.- Since:
- TotalCross 1.0
-
popupKCC
public void popupKCC()
user method to popup the keyboard/calendar/calculator for this edit.
-
onBoundsChanged
protected void onBoundsChanged(boolean screenChanged)
Description copied from class:ControlCalled after a setRect.- Overrides:
onBoundsChangedin classControl- Parameters:
screenChanged- If the bounds were changed due to a screen change (rotation, collapse)
-
onEvent
public void onEvent(Event event)
Called by the system to pass events to the edit control.
-
cutText
public void cutText(int sel1, int sel2)Cuts the text on the given range.
-
draw
protected void draw(Graphics g)
-
onWindowPaintFinished
protected void onWindowPaintFinished()
Description copied from class:ControlCalled after the window has finished a paint. Only called to the focused control and the parent's window.- Overrides:
onWindowPaintFinishedin classControl
-
onPaint
public void onPaint(Graphics g)
Description copied from class:ContainerDraws the border (if any). If you override this method, be sure to callsuper.onPaint(g);, or the border will not be drawn.
-
pushPosState
protected void pushPosState()
-
popPosState
protected void popPosState()
-
onColorsChanged
protected void onColorsChanged(boolean colorsChanged)
Description copied from class:ControlCalled after a setEnabled, setForeColor and setBackColor and when a control has been added to a Container. If colorsChanged is true, it was called from setForeColor/setBackColor/Container.add; otherwise, it was called from setEnabled- Overrides:
onColorsChangedin classContainer
-
setRect
public void setRect(int x, int y, int width, int height, Control relative, boolean screenChanged)Sets the rect for this MultiEdit. Note that height is recomputed based in the value for rowCount given in the constructor if the given height is PREFERRED- Overrides:
setRectin classControl- Parameters:
x- One of the relative positioning constants: LEFT, RIGHT, SAME, BEFORE, AFTER, CENTER, with a small adjustment. You can also use an absolute value, but this is strongly discouraged.y- One of the relative positioning constants: TOP, BOTTOM, SAME, BEFORE, AFTER, CENTER, with a small adjustment. You can also use an absolute value, but this is strongly discouraged.width- One of the relative positioning constants: PREFERRED, FILL, FIT, SAME. You can also use an absolute value, but this is strongly discouraged.height- One of the relative positioning constants: PREFERRED, FILL, FIT, SAME. You can also use an absolute value, but this is strongly discouraged.relative- To whom the position should be relative to; or null to be relative to the last control.screenChanged- Indicates that a screen change (resize, collapse) occured and therepositionmethod is calling this method. Set by the system. If you call this method directly, always pass false to it.- See Also:
Control.LEFT,Control.TOP,Control.RIGHT,Control.BOTTOM,Control.BEFORE,Control.AFTER,Control.CENTER,Control.SAME,Control.FILL,Control.PREFERRED,Control.FIT,Control.CENTER_OF,Control.RIGHT_OF,Control.BOTTOM_OF,Control.SCREENSIZE,Control.SCREENSIZEMIN,Control.SCREENSIZEMAX,Control.PARENTSIZE,Control.PARENTSIZEMIN,Control.PARENTSIZEMAX,Control.FONTSIZE,Container.add(Control, int, int),Container.add(Control, int, int, Control)
-
onFontChanged
protected void onFontChanged()
Description copied from class:ControlCalled after a setFont- Overrides:
onFontChangedin classControl
-
getFocusableControls
public void getFocusableControls(Vector v)
Description copied from class:ContainerGet a list of child controls of this container which are focus candidates- Overrides:
getFocusableControlsin classContainer- Parameters:
v- A vector into which to add the focus candidates.
-
scrollToLine
public void scrollToLine(int line)
Scrolls the text to the given line.
-
handleGeographicalFocusChangeKeys
public Control handleGeographicalFocusChangeKeys(KeyEvent ke)
Description copied from class:ControlUsed by the main event loop to give the currently focused control an opportunity to act directly on the KeyEvent.- Overrides:
handleGeographicalFocusChangeKeysin classControl- Parameters:
ke- The KeyEvent to be processed- Returns:
- The control that should get focus as a result of this KeyEvent. Null if this control did not handle the KeyEvent.
- See Also:
Settings.geographicalFocus
-
scrollToBottom
public void scrollToBottom()
Scrolls the text to bottom.
-
scrollToTop
public void scrollToTop()
Scrolls the tex to the top.
-
getLength
public int getLength()
Returns the length of the text.- Since:
- TotalCross 1.01
-
requestFocus
public void requestFocus()
Description copied from class:ControlSets the focus to this control. Note that in penless devices its also needed to setisHighlighting = false.- Overrides:
requestFocusin classControl
-
getKeyboardType
public byte getKeyboardType()
Returns the keyboard type of this Edit control.- Since:
- SuperWaba 5.67
- See Also:
Edit.KBD_NONE,Edit.KBD_DEFAULT,Edit.KBD_KEYBOARD,Edit.KBD_CALCULATOR,Edit.KBD_CALCULATOR
-
getCopy
public MultiEdit getCopy()
Returns a copy of this Edit with almost all features. Used by Keyboard and SIPBox classes.- Since:
- TotalCross 1.27
-
getFlick
public Flick getFlick()
Description copied from interface:ScrollableReturns the current flick object.- Specified by:
getFlickin interfaceScrollable
-
wasScrolled
public boolean wasScrolled()
Description copied from interface:ScrollableReturns true if the control was scrolled since last pen down- Specified by:
wasScrolledin interfaceScrollable
-
willOpenKeyboard
protected boolean willOpenKeyboard()
Description copied from class:ControlReturns true if this is a MultiEdit or an Edit that has a standard keyboard.- Overrides:
willOpenKeyboardin classControl
-
setCursorPos
public void setCursorPos(int pos)
Sets the cursor position, ranging from 0 to the text' length. You can use this withlastInsertPosto recover cursor position.
-
setCursorPos
public void setCursorPos(int start, int end)Sets the selected text of this Edit (if start != end). Can be used to set the cursor position, if start equals end. Start must be less or equal to end, and both must be >= 0. It can also be used to clear the selectedText, callingsetCursorPos(-1,0). Note: if you're setting the cursor position before the edit is drawn for the first time, the edit will not be scrolled if the end position goes beyond the limits. Important! No bounds checking is made. Be sure to not call this method with invalid positions! Example:ed.setText("1234567890123456"); ed.setCursorPos(3,14); ed.requestFocus();
-
getCursorPos
public int[] getCursorPos()
Returns an array with the cursor positions. You can use it with getText to find the selected text String. E.g.:int []cursorPos = ed.getCursorPos(); int start = cursorPos[0]; int end = cursorPos[1]; String text = ed.getText(); if (start != -1) // is the text selected? { String selectedText = text.substring(start,end); ...
-
timerTriggered
public void timerTriggered(TimerEvent e)
Description copied from interface:TimerListenerA TRIGGERED event was dispatched.- Specified by:
timerTriggeredin interfaceTimerListener- See Also:
TimerEvent
-
-