Java Code Examples for javax.swing.text.MutableAttributeSet#addAttribute()
The following examples show how to use
javax.swing.text.MutableAttributeSet#addAttribute() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: RTFAttributes.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
public boolean set(MutableAttributeSet target, int parameter) { /* See above note in the case that parameter==1 */ Boolean value = ( parameter != 0 ? True : False ); target.addAttribute(swingName, value); return true; /* true indicates we were successful */ }
Example 2
Source File: RTFAttributes.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 5 votes |
public boolean set(MutableAttributeSet target, int parameter) { /* See above note in the case that parameter==1 */ Boolean value = ( parameter != 0 ? True : False ); target.addAttribute(swingName, value); return true; /* true indicates we were successful */ }
Example 3
Source File: RTFAttributes.java From Java8CN with Apache License 2.0 | 5 votes |
public boolean setDefault(MutableAttributeSet target) { if (swingDefault != rtfDefault || ( target.getAttribute(swingName) != null ) ) target.addAttribute(swingName, Boolean.valueOf(rtfDefault)); return true; }
Example 4
Source File: RTFAttributes.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
public boolean setDefault(MutableAttributeSet target) { if (swingDefault != rtfDefault || ( target.getAttribute(swingName) != null ) ) target.addAttribute(swingName, Boolean.valueOf(rtfDefault)); return true; }
Example 5
Source File: RTFAttributes.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
public boolean set(MutableAttributeSet target, int parameter) { /* See above note in the case that parameter==1 */ Boolean value = ( parameter != 0 ? True : False ); target.addAttribute(swingName, value); return true; /* true indicates we were successful */ }
Example 6
Source File: RTFAttributes.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
public boolean set(MutableAttributeSet target) { /* TODO: There's some ambiguity about whether this should *set* or *toggle* the attribute. */ target.addAttribute(swingName, True); return true; /* true indicates we were successful */ }
Example 7
Source File: RTFAttributes.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
public boolean setDefault(MutableAttributeSet target) { if (swingDefault != rtfDefault || ( target.getAttribute(swingName) != null ) ) target.addAttribute(swingName, Boolean.valueOf(rtfDefault)); return true; }
Example 8
Source File: RTFAttributes.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
public boolean set(MutableAttributeSet target) { if (swingValue == null) target.removeAttribute(swingName); else target.addAttribute(swingName, swingValue); return true; }
Example 9
Source File: RTFAttributes.java From hottub with GNU General Public License v2.0 | 5 votes |
public boolean set(MutableAttributeSet target) { /* TODO: There's some ambiguity about whether this should *set* or *toggle* the attribute. */ target.addAttribute(swingName, True); return true; /* true indicates we were successful */ }
Example 10
Source File: RTFAttributes.java From Bytecoder with Apache License 2.0 | 5 votes |
public boolean set(MutableAttributeSet target, int parameter) { /* See above note in the case that parameter==1 */ Boolean value = ( parameter != 0 ? True : False ); target.addAttribute(swingName, value); return true; /* true indicates we were successful */ }
Example 11
Source File: RTFAttributes.java From jdk1.8-source-analysis with Apache License 2.0 | 5 votes |
public boolean set(MutableAttributeSet target) { /* TODO: There's some ambiguity about whether this should *set* or *toggle* the attribute. */ target.addAttribute(swingName, True); return true; /* true indicates we were successful */ }
Example 12
Source File: RTFAttributes.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
public boolean set(MutableAttributeSet target) { /* TODO: There's some ambiguity about whether this should *set* or *toggle* the attribute. */ target.addAttribute(swingName, True); return true; /* true indicates we were successful */ }
Example 13
Source File: RTFAttributes.java From dragonwell8_jdk with GNU General Public License v2.0 | 5 votes |
public boolean set(MutableAttributeSet target) { if (swingValue == null) target.removeAttribute(swingName); else target.addAttribute(swingName, swingValue); return true; }
Example 14
Source File: RTFAttributes.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
public boolean setDefault(MutableAttributeSet target) { if (swingDefault != rtfDefault || ( target.getAttribute(swingName) != null ) ) target.addAttribute(swingName, Boolean.valueOf(rtfDefault)); return true; }
Example 15
Source File: RTFAttributes.java From jdk8u_jdk with GNU General Public License v2.0 | 5 votes |
public boolean setDefault(MutableAttributeSet target) { if (swingDefault != rtfDefault || ( target.getAttribute(swingName) != null ) ) target.addAttribute(swingName, Boolean.valueOf(rtfDefault)); return true; }
Example 16
Source File: RTFAttributes.java From JDKSourceCode1.8 with MIT License | 5 votes |
public boolean setDefault(MutableAttributeSet target) { if (swingDefault != rtfDefault || ( target.getAttribute(swingName) != null ) ) target.addAttribute(swingName, Boolean.valueOf(rtfDefault)); return true; }
Example 17
Source File: BasicCheckRibbon.java From radiance with BSD 3-Clause "New" or "Revised" License | 5 votes |
private static void toggleStyleInSelection(JTextPane textPane, Object style) { MutableAttributeSet attrSet = new SimpleAttributeSet(); // Add or remove the style on the entire selection attrSet.addAttribute(style, !hasStyleInSelection(textPane, style)); textPane.getStyledDocument().setCharacterAttributes(textPane.getSelectionStart(), textPane.getSelectionEnd() - textPane.getSelectionStart(), attrSet, false); }
Example 18
Source File: RTFAttributes.java From Bytecoder with Apache License 2.0 | 5 votes |
public boolean setDefault(MutableAttributeSet target) { if (swingDefault != rtfDefault || ( target.getAttribute(swingName) != null ) ) target.addAttribute(swingName, Boolean.valueOf(rtfDefault)); return true; }
Example 19
Source File: RTFAttributes.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
public boolean set(MutableAttributeSet target) { /* TODO: There's some ambiguity about whether this should *set* or *toggle* the attribute. */ target.addAttribute(swingName, True); return true; /* true indicates we were successful */ }
Example 20
Source File: RTFAttributes.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
public boolean set(MutableAttributeSet target) { if (swingValue == null) target.removeAttribute(swingName); else target.addAttribute(swingName, swingValue); return true; }