use of org.fife.ui.rtextarea.RTextArea in project RSyntaxTextArea by bobbylight.
the class TipUtilTest method testToolTipBorder_oneArg_whiteBackground.
/**
* If the text area uses a white background (typical for "light"
* application themes), the Look and Feel's default tool tip
* border should be returned.
*/
@Test
void testToolTipBorder_oneArg_whiteBackground() {
RTextArea textArea = new RTextArea();
textArea.setBackground(Color.WHITE);
Assertions.assertNotNull(TipUtil.getToolTipBackground(textArea));
}
use of org.fife.ui.rtextarea.RTextArea in project RSyntaxTextArea by bobbylight.
the class TipUtilTest method testToolTipBackground_oneArg_whiteBackground.
/**
* If the text area uses a white background (typical for "light"
* application themes), the Look and Feel's default tool tip
* color should be returned.
*/
@Test
void testToolTipBackground_oneArg_whiteBackground() {
Color defaultTipBG = TipUtil.getToolTipBackground();
RTextArea textArea = new RTextArea();
textArea.setBackground(Color.WHITE);
Assertions.assertEquals(defaultTipBG, TipUtil.getToolTipBackground(textArea));
}
use of org.fife.ui.rtextarea.RTextArea in project RSyntaxTextArea by bobbylight.
the class TipUtilTest method testToolTipBorder_oneArg_nonWhiteBackground.
/**
* If the text area uses some oddball background color, the border
* returned should coordinate since that's what the tool tip's
* background color will be.
*/
@Test
void testToolTipBorder_oneArg_nonWhiteBackground() {
RTextArea textArea = new RTextArea();
textArea.setBackground(Color.RED);
Border actual = TipUtil.getToolTipBorder(textArea);
Assertions.assertTrue(actual instanceof LineBorder);
Border expected = BorderFactory.createLineBorder(Color.RED.brighter());
Assertions.assertEquals(Color.RED.brighter(), ((LineBorder) actual).getLineColor());
}
use of org.fife.ui.rtextarea.RTextArea in project omegaide by omegaui.
the class RSyntaxTextAreaUI method create.
/**
* Creates the view for an element.
*
* @param elem The element.
* @return The view.
*/
@Override
public View create(Element elem) {
RTextArea c = getRTextArea();
if (c instanceof RSyntaxTextArea) {
RSyntaxTextArea area = (RSyntaxTextArea) c;
View v;
if (area.getLineWrap()) {
v = new WrappedSyntaxView(elem);
} else {
v = new SyntaxView(elem);
}
return v;
}
return null;
}
use of org.fife.ui.rtextarea.RTextArea in project lara-framework by specs-feup.
the class EditorToolBar method addSearchButtons.
private void addSearchButtons() {
addNewItem("Find", "find", 0, StrokesAndActions.CTRL_F, a -> editor.getSearchPanel().getFocus());
addNewItem("Clear Markup", "mark", 0, StrokesAndActions.CTRL_SHIFT_M, a -> {
RTextArea textArea = getCurrentTab().getTextArea();
SearchEngine.find(textArea, new SearchContext());
});
}
Aggregations