< prev index next >

src/java.desktop/share/classes/javax/swing/text/StyledEditorKit.java

Print this page

        

*** 184,194 **** } }; } /** ! * Creates a new <code>AttributeTracker</code>. */ private void createInputAttributeUpdated() { inputAttributeUpdater = new AttributeTracker(); } --- 184,194 ---- } }; } /** ! * Creates a new {@code AttributeTracker}. */ private void createInputAttributeUpdated() { inputAttributeUpdater = new AttributeTracker(); }
*** 222,233 **** */ @SuppressWarnings("serial") // JDK-implementation class class AttributeTracker implements CaretListener, PropertyChangeListener, Serializable { /** ! * Updates the attributes. <code>dot</code> and <code>mark</code> ! * mark give the positions of the selection in <code>c</code>. */ void updateInputAttributes(int dot, int mark, JTextComponent c) { // EditorKit might not have installed the StyledDocument yet. Document aDoc = c.getDocument(); if (!(aDoc instanceof StyledDocument)) { --- 222,233 ---- */ @SuppressWarnings("serial") // JDK-implementation class class AttributeTracker implements CaretListener, PropertyChangeListener, Serializable { /** ! * Updates the attributes. {@code dot} and {@code mark} ! * mark give the positions of the selection in {@code c}. */ void updateInputAttributes(int dot, int mark, JTextComponent c) { // EditorKit might not have installed the StyledDocument yet. Document aDoc = c.getDocument(); if (!(aDoc instanceof StyledDocument)) {
*** 279,293 **** (JTextComponent)e.getSource()); } } /** ! * Copies the key/values in <code>element</code>s AttributeSet into ! * <code>set</code>. This does not copy component, icon, or element * names attributes. Subclasses may wish to refine what is and what * isn't copied here. But be sure to first remove all the attributes that ! * are in <code>set</code>.<p> * This is called anytime the caret moves over a different location. * * @param element the element * @param set the attributes */ --- 279,293 ---- (JTextComponent)e.getSource()); } } /** ! * Copies the key/values in {@code element}s AttributeSet into ! * {@code set}. This does not copy component, icon, or element * names attributes. Subclasses may wish to refine what is and what * isn't copied here. But be sure to first remove all the attributes that ! * are in {@code set}.<p> * This is called anytime the caret moves over a different location. * * @param element the element * @param set the attributes */
*** 375,385 **** * Serialized objects of this class will not be compatible with * future Swing releases. The current serialization support is * appropriate for short term storage or RMI between applications running * the same version of Swing. As of 1.4, support for long term storage * of all JavaBeans&trade; ! * has been added to the <code>java.beans</code> package. * Please see {@link java.beans.XMLEncoder}. */ @SuppressWarnings("serial") // Same-version serialization only public abstract static class StyledTextAction extends TextAction { --- 375,385 ---- * Serialized objects of this class will not be compatible with * future Swing releases. The current serialization support is * appropriate for short term storage or RMI between applications running * the same version of Swing. As of 1.4, support for long term storage * of all JavaBeans&trade; ! * has been added to the {@code java.beans} package. * Please see {@link java.beans.XMLEncoder}. */ @SuppressWarnings("serial") // Same-version serialization only public abstract static class StyledTextAction extends TextAction {
*** 495,505 **** * Serialized objects of this class will not be compatible with * future Swing releases. The current serialization support is * appropriate for short term storage or RMI between applications running * the same version of Swing. As of 1.4, support for long term storage * of all JavaBeans&trade; ! * has been added to the <code>java.beans</code> package. * Please see {@link java.beans.XMLEncoder}. */ @SuppressWarnings("serial") // Same-version serialization only public static class FontFamilyAction extends StyledTextAction { --- 495,505 ---- * Serialized objects of this class will not be compatible with * future Swing releases. The current serialization support is * appropriate for short term storage or RMI between applications running * the same version of Swing. As of 1.4, support for long term storage * of all JavaBeans&trade; ! * has been added to the {@code java.beans} package. * Please see {@link java.beans.XMLEncoder}. */ @SuppressWarnings("serial") // Same-version serialization only public static class FontFamilyAction extends StyledTextAction {
*** 552,562 **** * Serialized objects of this class will not be compatible with * future Swing releases. The current serialization support is * appropriate for short term storage or RMI between applications running * the same version of Swing. As of 1.4, support for long term storage * of all JavaBeans&trade; ! * has been added to the <code>java.beans</code> package. * Please see {@link java.beans.XMLEncoder}. */ @SuppressWarnings("serial") // Same-version serialization only public static class FontSizeAction extends StyledTextAction { --- 552,562 ---- * Serialized objects of this class will not be compatible with * future Swing releases. The current serialization support is * appropriate for short term storage or RMI between applications running * the same version of Swing. As of 1.4, support for long term storage * of all JavaBeans&trade; ! * has been added to the {@code java.beans} package. * Please see {@link java.beans.XMLEncoder}. */ @SuppressWarnings("serial") // Same-version serialization only public static class FontSizeAction extends StyledTextAction {
*** 600,630 **** private int size; } /** * An action to set foreground color. This sets the ! * <code>StyleConstants.Foreground</code> attribute for the * currently selected range of the target JEditorPane. * This is done by calling ! * <code>StyledDocument.setCharacterAttributes</code> * on the styled document associated with the target * JEditorPane. * <p> * If the target text component is specified as the * source of the ActionEvent and there is a command string, * the command string will be interpreted as the foreground * color. It will be interpreted by called ! * <code>Color.decode</code>, and should therefore be * legal input for that method. * <p> * <strong>Warning:</strong> * Serialized objects of this class will not be compatible with * future Swing releases. The current serialization support is * appropriate for short term storage or RMI between applications running * the same version of Swing. As of 1.4, support for long term storage * of all JavaBeans&trade; ! * has been added to the <code>java.beans</code> package. * Please see {@link java.beans.XMLEncoder}. */ @SuppressWarnings("serial") // Same-version serialization only public static class ForegroundAction extends StyledTextAction { --- 600,630 ---- private int size; } /** * An action to set foreground color. This sets the ! * {@code StyleConstants.Foreground} attribute for the * currently selected range of the target JEditorPane. * This is done by calling ! * {@code StyledDocument.setCharacterAttributes} * on the styled document associated with the target * JEditorPane. * <p> * If the target text component is specified as the * source of the ActionEvent and there is a command string, * the command string will be interpreted as the foreground * color. It will be interpreted by called ! * {@code Color.decode}, and should therefore be * legal input for that method. * <p> * <strong>Warning:</strong> * Serialized objects of this class will not be compatible with * future Swing releases. The current serialization support is * appropriate for short term storage or RMI between applications running * the same version of Swing. As of 1.4, support for long term storage * of all JavaBeans&trade; ! * has been added to the {@code java.beans} package. * Please see {@link java.beans.XMLEncoder}. */ @SuppressWarnings("serial") // Same-version serialization only public static class ForegroundAction extends StyledTextAction {
*** 668,697 **** private Color fg; } /** * An action to set paragraph alignment. This sets the ! * <code>StyleConstants.Alignment</code> attribute for the * currently selected range of the target JEditorPane. * This is done by calling ! * <code>StyledDocument.setParagraphAttributes</code> * on the styled document associated with the target * JEditorPane. * <p> * If the target text component is specified as the * source of the ActionEvent and there is a command string, * the command string will be interpreted as an integer * that should be one of the legal values for the ! * <code>StyleConstants.Alignment</code> attribute. * <p> * <strong>Warning:</strong> * Serialized objects of this class will not be compatible with * future Swing releases. The current serialization support is * appropriate for short term storage or RMI between applications running * the same version of Swing. As of 1.4, support for long term storage * of all JavaBeans&trade; ! * has been added to the <code>java.beans</code> package. * Please see {@link java.beans.XMLEncoder}. */ @SuppressWarnings("serial") // Same-version serialization only public static class AlignmentAction extends StyledTextAction { --- 668,697 ---- private Color fg; } /** * An action to set paragraph alignment. This sets the ! * {@code StyleConstants.Alignment} attribute for the * currently selected range of the target JEditorPane. * This is done by calling ! * {@code StyledDocument.setParagraphAttributes} * on the styled document associated with the target * JEditorPane. * <p> * If the target text component is specified as the * source of the ActionEvent and there is a command string, * the command string will be interpreted as an integer * that should be one of the legal values for the ! * {@code StyleConstants.Alignment} attribute. * <p> * <strong>Warning:</strong> * Serialized objects of this class will not be compatible with * future Swing releases. The current serialization support is * appropriate for short term storage or RMI between applications running * the same version of Swing. As of 1.4, support for long term storage * of all JavaBeans&trade; ! * has been added to the {@code java.beans} package. * Please see {@link java.beans.XMLEncoder}. */ @SuppressWarnings("serial") // Same-version serialization only public static class AlignmentAction extends StyledTextAction {
*** 738,748 **** * Serialized objects of this class will not be compatible with * future Swing releases. The current serialization support is * appropriate for short term storage or RMI between applications running * the same version of Swing. As of 1.4, support for long term storage * of all JavaBeans&trade; ! * has been added to the <code>java.beans</code> package. * Please see {@link java.beans.XMLEncoder}. */ @SuppressWarnings("serial") // Same-version serialization only public static class BoldAction extends StyledTextAction { --- 738,748 ---- * Serialized objects of this class will not be compatible with * future Swing releases. The current serialization support is * appropriate for short term storage or RMI between applications running * the same version of Swing. As of 1.4, support for long term storage * of all JavaBeans&trade; ! * has been added to the {@code java.beans} package. * Please see {@link java.beans.XMLEncoder}. */ @SuppressWarnings("serial") // Same-version serialization only public static class BoldAction extends StyledTextAction {
*** 778,788 **** * Serialized objects of this class will not be compatible with * future Swing releases. The current serialization support is * appropriate for short term storage or RMI between applications running * the same version of Swing. As of 1.4, support for long term storage * of all JavaBeans&trade; ! * has been added to the <code>java.beans</code> package. * Please see {@link java.beans.XMLEncoder}. */ @SuppressWarnings("serial") // Same-version serialization only public static class ItalicAction extends StyledTextAction { --- 778,788 ---- * Serialized objects of this class will not be compatible with * future Swing releases. The current serialization support is * appropriate for short term storage or RMI between applications running * the same version of Swing. As of 1.4, support for long term storage * of all JavaBeans&trade; ! * has been added to the {@code java.beans} package. * Please see {@link java.beans.XMLEncoder}. */ @SuppressWarnings("serial") // Same-version serialization only public static class ItalicAction extends StyledTextAction {
*** 818,828 **** * Serialized objects of this class will not be compatible with * future Swing releases. The current serialization support is * appropriate for short term storage or RMI between applications running * the same version of Swing. As of 1.4, support for long term storage * of all JavaBeans&trade; ! * has been added to the <code>java.beans</code> package. * Please see {@link java.beans.XMLEncoder}. */ @SuppressWarnings("serial") // Same-version serialization only public static class UnderlineAction extends StyledTextAction { --- 818,828 ---- * Serialized objects of this class will not be compatible with * future Swing releases. The current serialization support is * appropriate for short term storage or RMI between applications running * the same version of Swing. As of 1.4, support for long term storage * of all JavaBeans&trade; ! * has been added to the {@code java.beans} package. * Please see {@link java.beans.XMLEncoder}. */ @SuppressWarnings("serial") // Same-version serialization only public static class UnderlineAction extends StyledTextAction {
*** 852,863 **** } /** * StyledInsertBreakAction has similar behavior to that of ! * <code>DefaultEditorKit.InsertBreakAction</code>. That is when ! * its <code>actionPerformed</code> method is invoked, a newline * is inserted. Beyond that, this will reset the input attributes to * what they were before the newline was inserted. */ @SuppressWarnings("serial") // Superclass is not serializable across versions static class StyledInsertBreakAction extends StyledTextAction { --- 852,863 ---- } /** * StyledInsertBreakAction has similar behavior to that of ! * {@code DefaultEditorKit.InsertBreakAction}. That is when ! * its {@code actionPerformed} method is invoked, a newline * is inserted. Beyond that, this will reset the input attributes to * what they were before the newline was inserted. */ @SuppressWarnings("serial") // Superclass is not serializable across versions static class StyledInsertBreakAction extends StyledTextAction {
< prev index next >