/* * Copyright 2005 Joe Walker * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package jsx3.html; import org.directwebremoting.ScriptBuffer; import org.directwebremoting.ScriptSessions; import org.directwebremoting.io.Context; /** * Represents an HTML element that defines font styles. This class is available only when the Charting add-in is enabled. * @author Joe Walker [joe at getahead dot org] * @author DRAPGEN - Dwr Reverse Ajax Proxy GENerator */ public class FontTag extends jsx3.lang.Object { /** * All reverse ajax proxies need context to work from * @param context The script that got us to where we are now */ public FontTag(Context context, String extension) { super(context, extension); } /** * Returns the fontFamily field. * @param callback fontFamily */ public void getFontFamily(org.directwebremoting.ui.Callback<String> callback) { ScriptBuffer script = new ScriptBuffer(); String callbackPrefix = ""; if (callback != null) { callbackPrefix = "var reply = "; } script.appendCall(callbackPrefix + getContextPath() + "getFontFamily"); if (callback != null) { String key = org.directwebremoting.extend.CallbackHelperFactory.get().saveCallback(callback, String.class); script.appendCall("__System.activateCallback", key, "reply"); } ScriptSessions.addScript(script); } /** * Sets the fontFamily field. * @param fontFamily the new value for fontFamily */ public void setFontFamily(String fontFamily) { ScriptBuffer script = new ScriptBuffer(); script.appendCall(getContextPath() + "setFontFamily", fontFamily); ScriptSessions.addScript(script); } /** * Returns the fontsize field. * @param callback fontsize */ public void getFontSize(org.directwebremoting.ui.Callback<String> callback) { ScriptBuffer script = new ScriptBuffer(); String callbackPrefix = ""; if (callback != null) { callbackPrefix = "var reply = "; } script.appendCall(callbackPrefix + getContextPath() + "getFontSize"); if (callback != null) { String key = org.directwebremoting.extend.CallbackHelperFactory.get().saveCallback(callback, String.class); script.appendCall("__System.activateCallback", key, "reply"); } ScriptSessions.addScript(script); } /** * Sets the fontsize field. * @param fontSize the new value for fontsize */ public void setFontSize(int fontSize) { ScriptBuffer script = new ScriptBuffer(); script.appendCall(getContextPath() + "setFontSize", fontSize); ScriptSessions.addScript(script); } /** * Sets the fontsize field. * @param fontSize the new value for fontsize */ public void setFontSize(String fontSize) { ScriptBuffer script = new ScriptBuffer(); script.appendCall(getContextPath() + "setFontSize", fontSize); ScriptSessions.addScript(script); } /** * Returns the fontStyle field. * @param callback fontStyle */ public void getFontStyle(org.directwebremoting.ui.Callback<String> callback) { ScriptBuffer script = new ScriptBuffer(); String callbackPrefix = ""; if (callback != null) { callbackPrefix = "var reply = "; } script.appendCall(callbackPrefix + getContextPath() + "getFontStyle"); if (callback != null) { String key = org.directwebremoting.extend.CallbackHelperFactory.get().saveCallback(callback, String.class); script.appendCall("__System.activateCallback", key, "reply"); } ScriptSessions.addScript(script); } /** * Sets the fontStyle field. * @param fontStyle the new value for fontStyle */ public void setFontStyle(String fontStyle) { ScriptBuffer script = new ScriptBuffer(); script.appendCall(getContextPath() + "setFontStyle", fontStyle); ScriptSessions.addScript(script); } /** * Returns the fontWeight field. * @param callback fontWeight */ public void getFontWeight(org.directwebremoting.ui.Callback<String> callback) { ScriptBuffer script = new ScriptBuffer(); String callbackPrefix = ""; if (callback != null) { callbackPrefix = "var reply = "; } script.appendCall(callbackPrefix + getContextPath() + "getFontWeight"); if (callback != null) { String key = org.directwebremoting.extend.CallbackHelperFactory.get().saveCallback(callback, String.class); script.appendCall("__System.activateCallback", key, "reply"); } ScriptSessions.addScript(script); } /** * Sets the fontWeight field. * @param fontWeight the new value for fontWeight */ public void setFontWeight(String fontWeight) { ScriptBuffer script = new ScriptBuffer(); script.appendCall(getContextPath() + "setFontWeight", fontWeight); ScriptSessions.addScript(script); } /** * Returns the textAlign field. * @param callback textAlign */ public void getTextAlign(org.directwebremoting.ui.Callback<String> callback) { ScriptBuffer script = new ScriptBuffer(); String callbackPrefix = ""; if (callback != null) { callbackPrefix = "var reply = "; } script.appendCall(callbackPrefix + getContextPath() + "getTextAlign"); if (callback != null) { String key = org.directwebremoting.extend.CallbackHelperFactory.get().saveCallback(callback, String.class); script.appendCall("__System.activateCallback", key, "reply"); } ScriptSessions.addScript(script); } /** * Sets the textAlign field. * @param textAlign the new value for textAlign */ public void setTextAlign(String textAlign) { ScriptBuffer script = new ScriptBuffer(); script.appendCall(getContextPath() + "setTextAlign", textAlign); ScriptSessions.addScript(script); } /** * Returns the textDecoration field. * @param callback textDecoration */ public void getTextDecoration(org.directwebremoting.ui.Callback<String> callback) { ScriptBuffer script = new ScriptBuffer(); String callbackPrefix = ""; if (callback != null) { callbackPrefix = "var reply = "; } script.appendCall(callbackPrefix + getContextPath() + "getTextDecoration"); if (callback != null) { String key = org.directwebremoting.extend.CallbackHelperFactory.get().saveCallback(callback, String.class); script.appendCall("__System.activateCallback", key, "reply"); } ScriptSessions.addScript(script); } /** * Sets the textDecoration field. * @param textDecoration the new value for textDecoration */ public void setTextDecoration(String textDecoration) { ScriptBuffer script = new ScriptBuffer(); script.appendCall(getContextPath() + "setTextDecoration", textDecoration); ScriptSessions.addScript(script); } /** * Returns the color field. * @param callback color */ public void getColor(org.directwebremoting.ui.Callback<String> callback) { ScriptBuffer script = new ScriptBuffer(); String callbackPrefix = ""; if (callback != null) { callbackPrefix = "var reply = "; } script.appendCall(callbackPrefix + getContextPath() + "getColor"); if (callback != null) { String key = org.directwebremoting.extend.CallbackHelperFactory.get().saveCallback(callback, String.class); script.appendCall("__System.activateCallback", key, "reply"); } ScriptSessions.addScript(script); } /** * Sets the color field. * @param color the new value for color */ public void setColor(String color) { ScriptBuffer script = new ScriptBuffer(); script.appendCall(getContextPath() + "setColor", color); ScriptSessions.addScript(script); } }