public class BBCodeEditor extends UIContainer<BBCodeEditor>
Modifier and Type | Class and Description |
---|---|
static class |
BBCodeEditor.BBCodeChangeEvent |
ITransformable.Alpha, ITransformable.Brightness, ITransformable.Color, ITransformable.Position<T>, ITransformable.Rotate, ITransformable.Scale, ITransformable.Size<T>, ITransformable.Translate
Modifier and Type | Field and Description |
---|---|
protected java.util.EnumSet<net.malisis.core.util.bbcode.gui.BBCodeEditor.Tag> |
activeStyles |
protected BBTextField |
bbTexfield |
protected UIButton |
btnBgColor |
protected UIButton |
btnBold |
protected UIButton |
btnColor |
protected UIButton |
btnItalic |
protected UIButton |
btnItem |
protected UIButton |
btnStrikethrough |
protected UIButton |
btnUnderline |
protected UIButton |
btnWysiwyg |
protected int |
buttonAnchor |
protected boolean |
isWysiwyg |
protected UIContainer |
menu |
protected ComponentPosition |
menuPosition |
clipContent, components, contentHeight, contentWidth, horizontalPadding, titleLabel, verticalPadding, xOffset, yOffset
Constructor and Description |
---|
BBCodeEditor(MalisisGui gui) |
BBCodeEditor(MalisisGui gui,
int width,
int height) |
Modifier and Type | Method and Description |
---|---|
protected void |
calculateButtonPositions() |
protected void |
calculateMenuPosition() |
protected void |
calculateTextfieldPosition() |
protected void |
createButtons(MalisisGui gui) |
protected void |
createMenu(MalisisGui gui) |
java.lang.String |
getBBFormattedTex() |
BBString |
getBBText() |
java.lang.String |
getFormattedText() |
ComponentPosition |
getMenuPosition() |
java.lang.String |
getRawText() |
boolean |
isStyleActive(net.malisis.core.util.bbcode.gui.BBCodeEditor.Tag s) |
boolean |
isWysiwyg() |
void |
onClick(UIButton.ClickEvent event) |
boolean |
onKeyTyped(char keyChar,
int keyCode)
Called when a key is typed while this
UIComponent is focused or hovered. |
BBCodeEditor |
setButtonAnchor(int anchor) |
BBCodeEditor |
setMenuPosition(ComponentPosition position) |
BBCodeEditor |
setWysiwyg(boolean w) |
add, calculateContentSize, componentX, componentY, drawBackground, drawForeground, getClipArea, getComponentAt, getContentHeight, getContentWidth, getHorizontalPadding, getOffsetX, getOffsetY, getScrollStep, getTitle, getVerticalPadding, onAddedToScreen, onClose, onComponentSpaceChange, onComponentStateChange, onContentUpdate, remove, removeAll, setClipContent, setDisabled, setOffsetX, setOffsetY, setPadding, setTitle, setVisible, shouldClipContent
addControlComponent, draw, fireEvent, getAlpha, getAnchor, getGui, getHeight, getName, getParent, getPropertyString, getRawHeight, getRawWidth, getTooltip, getWidth, getX, getY, getZIndex, isDisabled, isFocused, isHovered, isInsideBounds, isRelativeHeight, isRelativeWidth, isVisible, onButtonPress, onButtonRelease, onClick, onDoubleClick, onDrag, onMouseMove, onRightClick, onScrollWheel, parentX, parentY, register, relativeX, relativeY, removeAllControlComponents, removeControlComponent, screenX, screenY, setAlpha, setAnchor, setFocused, setHovered, setName, setParent, setPosition, setPosition, setSize, setTooltip, setTooltip, setZIndex, toString, unregister
protected UIContainer menu
protected UIButton btnBold
protected UIButton btnItalic
protected UIButton btnUnderline
protected UIButton btnStrikethrough
protected UIButton btnColor
protected UIButton btnBgColor
protected UIButton btnItem
protected UIButton btnWysiwyg
protected BBTextField bbTexfield
protected ComponentPosition menuPosition
protected int buttonAnchor
protected java.util.EnumSet<net.malisis.core.util.bbcode.gui.BBCodeEditor.Tag> activeStyles
protected boolean isWysiwyg
public BBCodeEditor(MalisisGui gui)
public BBCodeEditor(MalisisGui gui, int width, int height)
public ComponentPosition getMenuPosition()
public java.lang.String getRawText()
public BBString getBBText()
public java.lang.String getBBFormattedTex()
public boolean isWysiwyg()
public BBCodeEditor setWysiwyg(boolean w)
public BBCodeEditor setMenuPosition(ComponentPosition position)
public BBCodeEditor setButtonAnchor(int anchor)
protected void createMenu(MalisisGui gui)
protected void createButtons(MalisisGui gui)
protected void calculateTextfieldPosition()
protected void calculateMenuPosition()
protected void calculateButtonPositions()
public boolean isStyleActive(net.malisis.core.util.bbcode.gui.BBCodeEditor.Tag s)
public java.lang.String getFormattedText()
public void onClick(UIButton.ClickEvent event)
public boolean onKeyTyped(char keyChar, int keyCode)
UIComponent
UIComponent
is focused or hovered.onKeyTyped
in class UIComponent<BBCodeEditor>
keyChar
- the key charkeyCode
- the key code