1 19 package org.netbeans.modules.xml.text.completion; 20 21 import java.awt.Color ; 22 23 import org.netbeans.modules.xml.api.model.*; 24 25 import javax.swing.text.JTextComponent ; 26 27 40 class ValueResultItem extends XMLResultItem { 41 42 private final String replacementText; 43 44 public ValueResultItem(GrammarResult res) { 45 super(res.getNodeValue(), res.getDisplayName()); 46 foreground = Color.magenta; 47 selectionForeground = Color.magenta.darker(); 48 replacementText = res.getNodeValue(); 49 } 50 51 public String getReplacementText(int modifiers) { 52 return replacementText; 53 } 54 55 Color getPaintColor() { return Color.blue; } 56 57 } 58 | Popular Tags |