Re: adding a scrollbar to layout area

ohh and before you all think im crazy the text is just example text untill i get it right lol thanks again for any replies to this :) oh and i know the programming is really messy but im just starting out with the java!!

Scroll bars in portlets is not something that is directly supported. You can have your portlet content display inside an iFrame. A sample iFrame portlet is included in the PDK.
If you have questions about portlet development, please post them to the PDK forum.
Regards,
Jerry

Similar Messages

  • Elements are not displaying in webdynpro view's layout area

    Hi All Webdynpro Experts,
    Im new to abap.  Im working in webdynpro.
    Im facing a issue now.
    By Default, I need to disable a button (u201CCreate Responseu201D) in FPM_OIF_COMPONENT WebDynpro component in CNR_VIEW. But the thing is I cannot see the any elements in the layout area.
    The component configuration is /SAPSRM/WDCC_I_FPM_OIF_RFQ_BID. When I clicked this, itu2019s showing some attributes and one button called u201CStart Configuratoru201D. So now what should I do, to view the elements in the layout area. How to configure that component. So that I can set the disable attribute for create response button from the layout area itself.
    Please help me in thisu2026
    Thanks,
    Rani.

    Hello Rani,
    when you have development rights for this component configuration, just click on the button "Start configurator". Afterwards the FPM Configuration editor is opened and you see the statically defined layout of the component configuration.
    Basically the layout of FPM applications is stored within a configuration context, you have to go into the component configuration.
    A customer e.g. could also do some customizing on sap delivered component configurations - this he will do in the so called admin mode. You can start this mode in several ways, e.g. when starting the FPM Configuration editor and just adding the URL-parameter sap-config-mode=X.
    Further information on how to adapt FPM applications on the [SAP Help portal|http://help.sap.com/saphelp_nw70ehp2/helpdata/en/6b/edc21e5e1e4a33a492b8955afffac7/content.htm].
    Best regards,
    Julia

  • Custom page layouts are not getting displayed in ribbon

    Hi,
    I have created a custom page layout under welcome category. This is getting displayed in pages library while creating a page and also in page layout option from site settings which is fine. But when a page is in edit mode if we click page->page layouts
    from ribbon, all the default page layouts are getting displayed except my custom page layout.
    Please advise.
    Regards,
    Chaitanya.

    you have a subsite in a site collection •the publishing feature is activated in the subsite, but not in the site collection •you want to edit/add page layouts on the site collection level, to be used within your subsite •when you open the site collection
    in SharePoint Designer, you can't see Page Layouts in the Site Objects panel You now have 2 options: you can either activate the publishing feature in the site collection (and the Page Layouts link comes back), or you can use the All Files link and browse
    to the master pages and page layouts library (_catalogs > masterpage.) Either option will do, unless you really don't want the publishing feature in the site collection.
    To fix the issue go to Site Actions -> Site Settings in the upper left corner.
    Under "Site Collection Administration" click on "Site Collection Features".
    Look for "SharePoint Server Publishing Infrastructure" and activate it. It might take a moment to load.
    Next return to "Site Settings" and click on "Manage Site Features"
    Look for "SharePoint Server Publishing" and activate it. It might take a moment to load.
    If this helped you resolve your issue, please mark it Answered

  • E book" it tells me that the bI have prepared a photobook, made a pdf and when I press "buy the book is missing photos on one ore more pages. The book does not miss any photos or text, all layouts are ok, the background color is ok. Can anybody help me?

    I have prepared a photo book, made a pdf and when I press "buy thhe book" it tells me that the book is missing photos on one ore more pages. The book does not miss any photos or text, all layouts are ok, the background color is ok. Can anybody help me?

    You are missing one or more photos - youprobably have a page background that requires a photo which is behind a page with photos on it - all pages must either have a photo or be a color - if you have a gray background it requires a photo - look through the book carefully and be sure to look at the background on any full page photos - you will find one or more missing photos
    LN

  • HT1391 how do I find free downloads that I have added to my library that are not showing up in the library on in icloud?

    How do I find free downloads that I hve added to my library that are not in my library or in icloud?

    Hi revsteph,
    If you have songs that you know you have purchased, but are not showing up in your iTunes Libarary, you may want to see if you can redownload them. You may find the following article helpful:
    Apple Support: Downloading past purchases from the App Store, iBookstore, and iTunes Store
    http://support.apple.com/kb/ht2519
    Cheers,
    - Brenden

  • ALV Layouts are missing in ECC6 after upgrade

    Dear Friends,
    we have an issue of missing ALV Layouts in ECC6 after upgrade of ECC6 from 4.7 version
    For example, we have a custom table ZRCILOT, data displayed using tocde se16, but when we check layout are missing in ECC6 but the same exist in 4.7 version.
    please check the attached screen-shots.
    kindly suggest, is there any possibility to retrive it.
    Thanks,
    Munvar Basha.

    Hello
    Variants should be preserved by the upgrade...
    You could export/import layout using the report from the here under note
    Regards
    551178 - FAQ ALV Layout
    During the upgrade of or when importing Support Packages?
    Answer: Layouts created by the customer are retained and you can continue to use them.
    643330 - ALV layout: Importing and exporting layouts

  • Re: DW CC The usual choices for the Workspace Layout are missing. How can I restore them?

    The usual choices for the Workspace Layout are missing. How can I restore them?The usual choices for the Workspace Layout are missing. How can I restore them?

    The Insert panel has been reworked pretty significantly in DWCC (Spry has been dead for over a year now, so it no longer appears for instance), but can still be opened via Window > Insert then dragged to the toolbar location (to get the tabs back) by clicking and dragging the Insert tab up to the top of the application frame until it highlights. Once you drop it, it will then appear as a toolbar.
    Not all of the tools will be visible at all times. DWCC knows when certain things can't technically be used and it won't display them if they can't be inserted.
    EDIT: Oops, forgot to add this. Here is a link talking about what has changed in the Insert panel: http://helpx.adobe.com/dreamweaver/using/changes-insert-options-creative-cloud.html

  • Adding a scrollbar to a portlet

    I am trying to limit the amount of screen space that my portlets take up, so I want to add a scrollbar to them if this is possible. I read earlier about possibly using a javascript. If anyone has experience with adding a scrollbar, I'd appreciate the assistance. Thanks.

    Hi,
    If the matter to be displayed is static then try floating frames.
    Regards,
    Mandar
    null

  • Adding field in script layout

    Hi,
    My requirement is adding one more field to script layout output but i if i added that field then page exceeds the output, they mentioned tab gap between fields, how to reduce tab gaps.
    can u please provide procedures how to achieve it.
    Best regards,
    Ravi

    Hi
    Check in the Line where u want to write/include ur new field  &LV_NEW& ..
    example
    OLD line             T1   &REGUD-SWABZ(15)&,,&REGUD-SWRBT(16)&
    New Line           T1   &REGUD-SWABZ(15)&,,&REGUD-SWRBT(16)&,,&LV_NEW&
    Also Check that  T1 in Paragraph Formats how many Tabs are declared and change the TAB spaces accordingly...
    surya

  • Help With adding a scrollbar to my applet

    This is the source code of my applet.I wat to have an autoscroll on this applet
    i think it is usefull if i put here all the code for my project.
    ======================================================
    Class ConsolePanel:
    The file defines a class ConsolePanel. Objects of type
    ConsolePanel can be used for simple input/output exchanges with
    the user. Various routines are provided for reading and writing
    values of various types from the output. (This class gives all
    the I/O behavior of another class, Console, that represents a
    separate window for doing console-style I/O.)
    This class is dependent on another class, ConsoleCanvas.
    Note that when the console has the input focus, it is outlined with
    a bright blue border. If, in addition, the console is waiting for
    user input, then there will be a blinking cursor. If the console
    is not outlined in light blue, the user has to click on it before
    any input will be accepted.
    This is an update an earlier version of the same class,
    rewritten to use realToString() for output of floating point
    numbers..
    package myproj;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.JScrollPane;
    import javax.swing.JScrollBar;
    import javax.swing.*;
    public class ConsolePanel extends JTextArea{
    static public JScrollPane scrollPane;
    // ***************************** Constructors *******************************
    public ConsolePanel() { // default constructor just provides default window title and size
    setBackground(Color.white);
    setLayout(new BorderLayout(0, 0));
    canvas = new ConsoleCanvas(500,1000);
    scrollPane = new JScrollPane(canvas);
    scrollPane.setVerticalScrollBarPolicy(
    JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
    scrollPane.setPreferredSize( new Dimension( 1000,10000) );
    add("Center", scrollPane);
    //scrollPane.getVerticalScrollBar().setUnitIncrement(1);
    try {
    jbInit();
    } catch (Exception ex) {
    ex.printStackTrace();
    public void clear() { // clear all characters from the canvas
    canvas.clear();
    // *************************** I/O Methods *********************************
    // Methods for writing the primitive types, plus type String,
    // to the console window, with no extra spaces.
    // Note that the real-number data types, float
    // and double, a rounded version is output that will
    // use at most 10 or 11 characters. If you want to
    // output a real number with full accuracy, use
    // "con.put(String.valueOf(x))", for example.
    public void put(int x) {
    put(x, 0);
    } // Note: also handles byte and short!
    public void put(long x) {
    put(x, 0);
    public void put(double x) {
    put(x, 0);
    } // Also handles float.
    public void put(char x) {
    put(x, 0);
    public void put(boolean x) {
    put(x, 0);
    public void put(String x) {
    put(x, 0);
    // Methods for writing the primitive types, plus type String,
    // to the console window,followed by a carriage return, with
    // no extra spaces.
    public void putln(int x) {
    put(x, 0);
    newLine();
    } // Note: also handles byte and short!
    public void putln(long x) {
    put(x, 0);
    newLine();
    public void putln(double x) {
    put(x, 0);
    newLine();
    } // Also handles float.
    public void putln(char x) {
    put(x, 0);
    newLine();
    public void putln(boolean x) {
    put(x, 0);
    newLine();
    public void putln(String x) {
    put(x, 0);
    newLine();
    // Methods for writing the primitive types, plus type String,
    // to the console window, with a minimum field width of w,
    // and followed by a carriage return.
    // If outut value is less than w characters, it is padded
    // with extra spaces in front of the value.
    public void putln(int x, int w) {
    put(x, w);
    newLine();
    } // Note: also handles byte and short!
    public void putln(long x, int w) {
    put(x, w);
    newLine();
    public void putln(double x, int w) {
    put(x, w);
    newLine();
    } // Also handles float.
    public void putln(char x, int w) {
    put(x, w);
    newLine();
    public void putln(boolean x, int w) {
    put(x, w);
    newLine();
    public void putln(String x, int w) {
    put(x, w);
    newLine();
    // Method for outputting a carriage return
    public void putln() {
    newLine();
    // Methods for writing the primitive types, plus type String,
    // to the console window, with minimum field width w.
    public void put(int x, int w) {
    dumpString(String.valueOf(x), w);
    } // Note: also handles byte and short!
    public void put(long x, int w) {
    dumpString(String.valueOf(x), w);
    public void put(double x, int w) {
    dumpString(realToString(x), w);
    } // Also handles float.
    public void put(char x, int w) {
    dumpString(String.valueOf(x), w);
    public void put(boolean x, int w) {
    dumpString(String.valueOf(x), w);
    public void put(String x, int w) {
    dumpString(x, w);
    // Methods for reading in the primitive types, plus "words" and "lines".
    // The "getln..." methods discard any extra input, up to and including
    // the next carriage return.
    // A "word" read by getlnWord() is any sequence of non-blank characters.
    // A "line" read by getlnString() or getln() is everything up to next CR;
    // the carriage return is not part of the returned value, but it is
    // read and discarded.
    // Note that all input methods except getAnyChar(), peek(), the ones for lines
    // skip past any blanks and carriage returns to find a non-blank value.
    // getln() can return an empty string; getChar() and getlnChar() can
    // return a space or a linefeed ('\n') character.
    // peek() allows you to look at the next character in input, without
    // removing it from the input stream. (Note that using this
    // routine might force the user to enter a line, in order to
    // check what the next character.)
    // Acceptable boolean values are the "words": true, false, t, f, yes,
    // no, y, n, 0, or 1; uppercase letters are OK.
    // None of these can produce an error; if an error is found in input,
    // the user is forced to re-enter.
    // Available input routines are:
    // getByte() getlnByte() getShort() getlnShort()
    // getInt() getlnInt() getLong() getlnLong()
    // getFloat() getlnFloat() getDouble() getlnDouble()
    // getChar() getlnChar() peek() getAnyChar()
    // getWord() getlnWord() getln() getString() getlnString()
    // (getlnString is the same as getln and is onlyprovided for consistency.)
    public byte getlnByte() {
    byte x = getByte();
    emptyBuffer();
    return x;
    public short getlnShort() {
    short x = getShort();
    emptyBuffer();
    return x;
    public int getlnInt() {
    int x = getInt();
    emptyBuffer();
    return x;
    public long getlnLong() {
    long x = getLong();
    emptyBuffer();
    return x;
    public float getlnFloat() {
    float x = getFloat();
    emptyBuffer();
    return x;
    public double getlnDouble() {
    double x = getDouble();
    emptyBuffer();
    return x;
    public char getlnChar() {
    char x = getChar();
    emptyBuffer();
    return x;
    public boolean getlnBoolean() {
    boolean x = getBoolean();
    emptyBuffer();
    return x;
    public String getlnWord() {
    String x = getWord();
    emptyBuffer();
    return x;
    public String getlnString() {
    return getln();
    } // same as getln()
    public String getln() {
    StringBuffer s = new StringBuffer(100);
    char ch = readChar();
    while (ch != '\n') {
    s.append(ch);
    ch = readChar();
    return s.toString();
    public byte getByte() {
    return (byte) readInteger( -128L, 127L);
    public short getShort() {
    return (short) readInteger( -32768L, 32767L);
    public int getInt() {
    return (int) readInteger((long) Integer.MIN_VALUE,
    (long) Integer.MAX_VALUE);
    public long getLong() {
    return readInteger(Long.MIN_VALUE, Long.MAX_VALUE);
    public char getAnyChar() {
    return readChar();
    public char peek() {
    return lookChar();
    public char getChar() { // skip spaces & cr's, then return next char
    char ch = lookChar();
    while (ch == ' ' || ch == '\n') {
    readChar();
    if (ch == '\n') {
    dumpString("? ", 0);
    ch = lookChar();
    return readChar();
    public float getFloat() { // can return positive or negative infinity
    float x = 0.0F;
    while (true) {
    String str = readRealString();
    if (str.equals("")) {
    errorMessage("Illegal floating point input.",
    "Real number in the range " + Float.MIN_VALUE +
    " to " + Float.MAX_VALUE);
    } else {
    Float f = null;
    try {
    f = Float.valueOf(str);
    } catch (NumberFormatException e) {
    errorMessage("Illegal floating point input.",
    "Real number in the range " + Float.MIN_VALUE +
    " to " + Float.MAX_VALUE);
    continue;
    if (f.isInfinite()) {
    errorMessage("Floating point input outside of legal range.",
    "Real number in the range " + Float.MIN_VALUE +
    " to " + Float.MAX_VALUE);
    continue;
    x = f.floatValue();
    break;
    return x;
    public double getDouble() {
    double x = 0.0;
    while (true) {
    String str = readRealString();
    if (str.equals("")) {
    errorMessage("Illegal floating point input",
    "Real number in the range " + Double.MIN_VALUE +
    " to " + Double.MAX_VALUE);
    } else {
    Double f = null;
    try {
    f = Double.valueOf(str);
    } catch (NumberFormatException e) {
    errorMessage("Illegal floating point input",
    "Real number in the range " + Double.MIN_VALUE +
    " to " + Double.MAX_VALUE);
    continue;
    if (f.isInfinite()) {
    errorMessage("Floating point input outside of legal range.",
    "Real number in the range " + Double.MIN_VALUE +
    " to " + Double.MAX_VALUE);
    continue;
    x = f.doubleValue();
    break;
    return x;
    public String getWord() {
    char ch = lookChar();
    while (ch == ' ' || ch == '\n') {
    readChar();
    if (ch == '\n') {
    dumpString("? ", 0);
    ch = lookChar();
    StringBuffer str = new StringBuffer(50);
    while (ch != ' ' && ch != '\n') {
    str.append(readChar());
    ch = lookChar();
    return str.toString();
    public boolean getBoolean() {
    boolean ans = false;
    while (true) {
    String s = getWord();
    if (s.equalsIgnoreCase("true") || s.equalsIgnoreCase("t") ||
    s.equalsIgnoreCase("yes") || s.equalsIgnoreCase("y") ||
    s.equals("1")) {
    ans = true;
    break;
    } else if (s.equalsIgnoreCase("false") || s.equalsIgnoreCase("f") ||
    s.equalsIgnoreCase("no") || s.equalsIgnoreCase("n") ||
    s.equals("0")) {
    ans = false;
    break;
    } else {
    errorMessage("Illegal boolean input value.",
    "one of: true, false, t, f, yes, no, y, n, 0, or 1");
    return ans;
    // ***************** Everything beyond this point is private *******************
    // ********************** Utility routines for input/output ********************
    private ConsoleCanvas canvas; // the canvas where I/O is displayed
    private String buffer = null; // one line read from input
    private int pos = 0; // position next char in input line that has
    // not yet been processed
    private String readRealString() { // read chars from input following syntax of real numbers
    StringBuffer s = new StringBuffer(50);
    char ch = lookChar();
    while (ch == ' ' || ch == '\n') {
    readChar();
    if (ch == '\n') {
    dumpString("? ", 0);
    ch = lookChar();
    if (ch == '-' || ch == '+') {
    s.append(readChar());
    ch = lookChar();
    while (ch == ' ') {
    readChar();
    ch = lookChar();
    } while (ch >= '0' && ch <= '9') {
    s.append(readChar());
    ch = lookChar();
    if (ch == '.') {
    s.append(readChar());
    ch = lookChar();
    while (ch >= '0' && ch <= '9') {
    s.append(readChar());
    ch = lookChar();
    if (ch == 'E' || ch == 'e') {
    s.append(readChar());
    ch = lookChar();
    if (ch == '-' || ch == '+') {
    s.append(readChar());
    ch = lookChar();
    } while (ch >= '0' && ch <= '9') {
    s.append(readChar());
    ch = lookChar();
    return s.toString();
    private long readInteger(long min, long max) { // read long integer, limited to specified range
    long x = 0;
    while (true) {
    StringBuffer s = new StringBuffer(34);
    char ch = lookChar();
    while (ch == ' ' || ch == '\n') {
    readChar();
    if (ch == '\n') {
    dumpString("? ", 0);
    ch = lookChar();
    if (ch == '-' || ch == '+') {
    s.append(readChar());
    ch = lookChar();
    while (ch == ' ') {
    readChar();
    ch = lookChar();
    } while (ch >= '0' && ch <= '9') {
    s.append(readChar());
    ch = lookChar();
    if (s.equals("")) {
    errorMessage("Illegal integer input.",
    "Integer in the range " + min + " to " + max);
    } else {
    String str = s.toString();
    try {
    x = Long.parseLong(str);
    } catch (NumberFormatException e) {
    errorMessage("Illegal integer input.",
    "Integer in the range " + min + " to " + max);
    continue;
    if (x < min || x > max) {
    errorMessage("Integer input outside of legal range.",
    "Integer in the range " + min + " to " + max);
    continue;
    break;
    return x;
    private static String realToString(double x) {
    // Goal is to get a reasonable representation of x in at most
    // 10 characters, or 11 characters if x is negative.
    if (Double.isNaN(x)) {
    return "undefined";
    if (Double.isInfinite(x)) {
    if (x < 0) {
    return "-INF";
    } else {
    return "INF";
    if (Math.abs(x) <= 5000000000.0 && Math.rint(x) == x) {
    return String.valueOf((long) x);
    String s = String.valueOf(x);
    if (s.length() <= 10) {
    return s;
    boolean neg = false;
    if (x < 0) {
    neg = true;
    x = -x;
    s = String.valueOf(x);
    if (x >= 0.00005 && x <= 50000000 &&
    (s.indexOf('E') == -1 && s.indexOf('e') == -1)) { // trim x to 10 chars max
    s = round(s, 10);
    s = trimZeros(s);
    } else if (x > 1) { // construct exponential form with positive exponent
    long power = (long) Math.floor(Math.log(x) / Math.log(10));
    String exp = "E" + power;
    int numlength = 10 - exp.length();
    x = x / Math.pow(10, power);
    s = String.valueOf(x);
    s = round(s, numlength);
    s = trimZeros(s);
    s += exp;
    } else { // constuct exponential form
    long power = (long) Math.ceil( -Math.log(x) / Math.log(10));
    String exp = "E-" + power;
    int numlength = 10 - exp.length();
    x = x * Math.pow(10, power);
    s = String.valueOf(x);
    s = round(s, numlength);
    s = trimZeros(s);
    s += exp;
    if (neg) {
    return "-" + s;
    } else {
    return s;
    private static String trimZeros(String num) { // used by realToString
    if (num.indexOf('.') >= 0 && num.charAt(num.length() - 1) == '0') {
    int i = num.length() - 1;
    while (num.charAt(i) == '0') {
    i--;
    if (num.charAt(i) == '.') {
    num = num.substring(0, i);
    } else {
    num = num.substring(0, i + 1);
    return num;
    private static String round(String num, int length) { // used by realToString
    if (num.indexOf('.') < 0) {
    return num;
    if (num.length() <= length) {
    return num;
    if (num.charAt(length) >= '5' && num.charAt(length) != '.') {
    char[] temp = new char[length + 1];
    int ct = length;
    boolean rounding = true;
    for (int i = length - 1; i >= 0; i--) {
    temp[ct] = num.charAt(i);
    if (rounding && temp[ct] != '.') {
    if (temp[ct] < '9') {
    temp[ct]++;
    rounding = false;
    } else {
    temp[ct] = '0';
    ct--;
    if (rounding) {
    temp[ct] = '1';
    ct--;
    // ct is -1 or 0
    return new String(temp, ct + 1, length - ct);
    } else {
    return num.substring(0, length);
    private void dumpString(String str, int w) { // output string to console
    for (int i = str.length(); i < w; i++) {
    canvas.addChar(' ');
    for (int i = 0; i < str.length(); i++) {
    if ((int) str.charAt(i) >= 0x20 && (int) str.charAt(i) != 0x7F) { // no control chars or delete
    canvas.addChar(str.charAt(i));
    } else if (str.charAt(i) == '\n' || str.charAt(i) == '\r') {
    newLine();
    private void errorMessage(String message, String expecting) {
    // inform user of error and force user to re-enter.
    newLine();
    dumpString(" *** Error in input: " + message + "\n", 0);
    dumpString(" *** Expecting: " + expecting + "\n", 0);
    dumpString(" *** Discarding Input: ", 0);
    if (lookChar() == '\n') {
    dumpString("(end-of-line)\n\n", 0);
    } else {
    while (lookChar() != '\n') {
    canvas.addChar(readChar());
    dumpString("\n\n", 0);
    dumpString("Please re-enter: ", 0);
    readChar(); // discard the end-of-line character
    private char lookChar() { // return next character from input
    if (buffer == null || pos > buffer.length()) {
    fillBuffer();
    if (pos == buffer.length()) {
    return '\n';
    return buffer.charAt(pos);
    private char readChar() { // return and discard next character from input
    char ch = lookChar();
    pos++;
    return ch;
    private void newLine() { // output a CR to console
    canvas.addCR();
    private void fillBuffer() { // Wait for user to type a line and press return,
    // and put the typed line into the buffer.
    buffer = canvas.readLine();
    pos = 0;
    private void emptyBuffer() { // discard the rest of the current line of input
    buffer = null;
    public void clearBuffers() { // I expect this will only be called by
    // CanvasApplet when a program ends. It should
    // not be called in the middle of a running program.
    buffer = null;
    canvas.clearTypeAhead();
    private void jbInit() throws Exception {
    this.setNextFocusableComponent(scrollPane);
    this.setToolTipText("");
    } // end of class Console
    ============================================================
    Class ConsoleCanvas:
    /* A class that implements basic console-oriented input/output, for use with
    Console.java and ConsolePanel.java. This class provides the basic character IO.
    Higher-leve fucntions (reading and writing numbers, booleans, etc) are provided
    in Console.java and ConolePanel.java.
    (This vesion of ConsoleCanvas is an udate of an earilier version, rewritten to
    be compliand with Java 1.1. David Eck; July 17, 1998.)
    (Modified August 16, 1998 to add the
    a mousePressed method to ConsoleCanvas. The mousePressed method requests
    the focus. This is necessary for Sun's Java implementation -- though not,
    apparently for anyone else's. Also added: an isFocusTraversable() method)
    MouseListener interface and
    Minor modifications, February 9, 2000, some glitches in the graphics.
    package myproj;
    import java.awt.*;
    import java.awt.event.*;
    import java.util.*;
    import javax.swing.*;
    public class ConsoleCanvas extends JTextArea implements FocusListener, KeyListener,
    MouseListener {
    // public interface, constructor and methods
    public ConsoleCanvas(int u,int y) {
    addFocusListener(this);
    addKeyListener(this);
    try {
    jbInit();
    } catch (Exception ex) {
    ex.printStackTrace();
    public final String readLine() { // wait for user to enter a line of input;
    // Line can only contain characters in the range
    // ' ' to '~'.
    return doReadLine();
    public final void addChar(char ch) { // output PRINTABLE character to console
    putChar(ch);
    public final void addCR() { // add a CR to the console
    putCR();
    public synchronized void clear() { // clear console and return cursor to row 0, column 0.
    if (OSC == null) {
    return;
    currentRow = 0;
    currentCol = 0;
    OSCGraphics.setColor(Color.white);
    OSCGraphics.fillRect(4, 4, getSize().width - 8, getSize().height - 8);
    OSCGraphics.setColor(Color.black);
    repaint();
    try {
    Thread.sleep(25);
    } catch (InterruptedException e) {}
    // focus and key event handlers; not meant to be called excpet by system
    public void keyPressed(KeyEvent evt) {
    doKey(evt.getKeyChar());
    public void keyReleased(KeyEvent evt) {}
    public void keyTyped(KeyEvent evt) {}
    public void focusGained(FocusEvent evt) {
    doFocus(true);
    public void focusLost(FocusEvent evt) {
    doFocus(false);
    public boolean isFocusTraversable() {
    // Allows the user to move the focus to the canvas
    // by pressing the tab key.
    return true;
    // Mouse listener methods -- here just to make sure that the canvas
    // gets the focuse when the user clicks on it. These are meant to
    // be called only by the system.
    public void mousePressed(MouseEvent evt) {
    requestFocus();
    public void mouseReleased(MouseEvent evt) {}
    public void mouseClicked(MouseEvent evt) {}
    public void mouseEntered(MouseEvent evt) {}
    public void mouseExited(MouseEvent evt) {}
    // implementation section: protected variables and methods.
    protected StringBuffer typeAhead = new StringBuffer();
    // Characters typed by user but not yet processed;
    // User can "type ahead" the charcters typed until
    // they are needed to satisfy a readLine.
    protected final int maxLineLength = 256;
    // No lines longer than this are returned by readLine();
    // The system effectively inserts a CR after 256 chars
    // of input without a carriage return.
    protected int rows, columns; // rows and columns of chars in the console
    protected int currentRow, currentCol; // current curson position
    protected Font font; // Font used in console (Courier); All font
    // data is set up in the doSetup() method.
    protected int lineHeight; // height of one line of text in the console
    protected int baseOffset; // distance from top of a line to its baseline
    protected int charWidth; // width of a character (constant, since a monospaced font is used)
    protected int leading; // space between lines
    protected int topOffset; // distance from top of console to top of text
    protected int leftOffset; // distance from left of console to first char on line
    protected Image OSC; // off-screen backup for console display (except cursor)
    protected Graphics OSCGraphics; // graphics context for OSC
    protected boolean hasFocus = false; // true if this canvas has the input focus
    protected boolean cursorIsVisible = false; // true if cursor is currently visible
    private int pos = 0; // exists only for sharing by next two methods
    public synchronized void clearTypeAhead() {
    // clears any unprocessed user typing. This is meant only to
    // be called by ConsolePanel, when a program being run by
    // console Applet ends. But just to play it safe, pos is
    // set to -1 as a signal to doReadLine that it should return.
    typeAhead.setLength(0);
    pos = -1;
    notify();
    protected synchronized String doReadLine() { // reads a line of input, up to next CR
    if (OSC == null) { // If this routine is called before the console has
    // completely opened, we shouldn't procede; give the
    // window a chance to open, so that paint() can call doSetup().
    try {
    wait(5000);
    } catch (InterruptedException e) {} // notify() should be set by doSetup()
    if (OSC == null) { // If nothing has happened for 5 seconds, we are probably in
    // trouble, but when the heck, try calling doSetup and proceding anyway.
    doSetup();
    if (!hasFocus) { // Make sure canvas has input focus
    requestFocus();
    StringBuffer lineBuffer = new StringBuffer(); // buffer for constructing line from user
    pos = 0;
    while (true) { // Read and process chars from the typeAhead buffer until a CR is found.
    while (pos >= typeAhead.length()) { // If the typeAhead buffer is empty, wait for user to type something
    cursorBlink();
    try {
    wait(500);
    } catch (InterruptedException e) {}
    if (pos == -1) { // means clearTypeAhead was called;
    return ""; // this is an abnormal return that should not happen
    if (cursorIsVisible) {
    cursorBlink();
    if (typeAhead.charAt(pos) == '\r' || typeAhead.charAt(pos) == '\n') {
    putCR();
    pos++;
    break;
    if (typeAhead.charAt(pos) == 8 || typeAhead.charAt(pos) == 127) {
    if (lineBuffer.length() > 0) {
    lineBuffer.setLength(lineBuffer.length() - 1);
    eraseChar();
    pos++;
    } else if (typeAhead.charAt(pos) >= ' ' &&
    typeAhead.charAt(pos) < 127) {
    putChar(typeAhead.charAt(pos));
    lineBuffer.append(typeAhead.charAt(pos));
    pos++;
    } else {
    pos++;
    if (lineBuffer.length() == maxLineLength) {
    putCR();
    pos = typeAhead.length();
    break;
    if (pos >= typeAhead.leng

    Hi
    I don't understand the exact need you want
    you want to add Scrolling facility to your Entire Applet or only for the Textarea Class?
    In first case
    Create the ScrollPane and add it to the applet contentPane. and put entire components to a Panel and just add it to scroll pane.
    Regards
    Vinoth

  • How do I edit or remove text automatically added to a DITA layout?

    I'm evaluating FM11 with an eye toward using it to author our print manuals (along with all the reuse stuff that DITA will allow). I have some experience with DITA authoring in other applications, but FM is new to me.
    It's going to be up to me and a colleague to demonstrate how FM is an improvement over our current manual process (InDesign). One thing we need to demonstrate in particular is how we'll retain complete control over layout appearances (something we don't easily get in our other XML authoring tool).
    I've been playing with the "New" DITA task/reference/concept templates as they open, and I'm troubled to see that text automatically appears in some places and I can't edit it or delete it. For instance, an <info> tag adds the text "ADDITIONAL INFORMATION". We may not want that text to appear in our layouts, or we may want to change it. At the very least, I'll need to demonstrate that I have control over text like this. 
    I've looked through Reference Pages, EDDs, DTDs, INIs, and several other places, and I can't nail down the source of the (potentially) unwanted text. Can someone point me in the right direction?

    Hi ohnehosen...
    These strings are defined in the EDD, as autonumber text in the paragraph style, or on the reference pages. It sounds like you've checked all those places, but they *are* there. One problem that you may be running into with FM11 is that you're likely using DITA 1.2, and for DITA 1.2 there is a separate structure application for each topic type. That means you'll have different EDDs and templates to search through. If you modify an EDD you'll be needing to import that into the corresponding template.
    I strongly suggest that instead of modifying the default structure apps, you first clone the defaults to names of your own. Then you modify your custom apps and leave the default apps available unmodified for testing. You *will* break the apps at some point (everyone does), and without the default unmodified apps available for testing.
    If you don't need the DITA 1.2 model, you might consider using the DITA 1.1 apps, which (I believe) are just one app for all topic types.
    OR .. if you want a far simpler and reliable option for PDF publishing from DITA, you might check out DITA-FMx. This is a product that I sell, but it provides enhanced DITA authoring and publishing tools in FrameMaker ..
        http://leximation.com/dita-fmx/
    Cheers,
    ...scott
    Scott Prentice
    Leximation, Inc.
    www.leximation.com

  • TS3989 Photos are ok in aperture and iphoto but in photostream on ipad and iphone the top of all portrait photos is chopped off. I tried switching photostream off and on but got the same. Only happened with photos added today, all past photos are fine

    I have never had any problems before but all portrait photos added today have the top chopped off. For example , people's heads are missing or roofs or buildings are chopped off. Photos are fine on the camera and on my mac in iphoto and aperture. Switched off photostream on my ipad...all photos were deleted. Switched photostream back on and all photos uploaded again and portrait photos are cropped again

    It sounds like while trying to import the photos with insufficient disk space those image files were damaged and not copied fully.  Now that you have sufficient space (a minimum of 10 GB is recommended) the latest imports are good.
    What do you get if you export one of the problem photos out of iPhoto as Kind=Original and try to open it with Preview.  If it appears the same then there's nothing you can to do recover them.
    OT

  • Lr4 and Blurb layouts are different when printed

    Hi all,
    I've recently received a printed photo book from Blurb, I did the layout in LR4 on the "book" module and then sent it to Blurb to be printed.
    There were a couple of double page photos and obviously i set all the photos out with complimentary photos on facing pages.
    However I just received the book from Blurb and the pages are all pushed forward (or back) a page so the double page spreads are now half a photo on the same page but opposing sides and the rest of it has been all thrown out also....
    The LR4 layout has the pages numbered and facing each other starting with 1-2, 3-4, 5-6 etc as I would expect, however my book is 1, 2-3, 4-5 etc so 1 is facing the cover sheet.
    Blurb are saying that it's either due to Flash and Java not being up to date (which they are) or sending the file over a wireless connection and I should try hard cabling....this makes no sense to me as a connection isn't responsible for page numbering.
    They have been good enough to print the book again but I need to know how to get around this problem before so. Anyone had a similar experience or know where I'm going wrong?
    There are some pics so you can see the problem....the first 3 are from the Blurb preview and final printed book...the last 3 are screenshots from the LR layout showing how I would assume the double page spreads and other photos would turn out....
    I did preview the book on the Blurb website (just out of interest) after I had uploaded and ordered it, it was the same as the printed book, before the printing process began I ask Blurb suport to check it for me and resolve it but they didn't know how it was going to look for some reason or didn't quite understand the problem...one person was trying to tell me how to put actual page numbers onto the book....
    Anyway, all and any help appreciated...

    No. In both cases, the TIFs were simply placed into the document and left untouched from that point forward.

  • Spry Accordion 1.6.1 gains vert & hztl scrollbars in content area.

    I've scratched my scalp raw. This page works fine in both Firefox and Chrome, but picks up vertical and horizontal scrollbars in the content area once open. Is this a known bug, or does it have something to do with the fact that I'm also using a Spry tabs inside the accordion content area? I'm using Spry 1.6.1 and Googling the issue turned up a few other people with the same problem. I've fiddled with the CSS overflow and height properties of the .AccordionPanelContent class, but to no avail. Please help!

    I'm sorry, I did not complete the sentence correctly. The scrollbars appear in IE7. They're fine in Firefox, Chrome and IE8. Should I post html file and dependencies?

  • Scrollbar In Content Area

    Hi SDNers,
    I am using the Std. Default Framework Page. In addition to the Content Area, i need to add a custom breadcrumb iView in the Work Area section of the Desktop Inner page.
    The properties are set as follows:
    Desktop Inner Page -
    > Height Type: Full Page, Isolation Method : URL.
    Content Area iView -
    > Height Type: Fixed, Isolation Method : Embedded, Fixed Height: 200
    Custom Iview.         -
    > Height Type: Automatic, Isolation Method : Embedded
    Web Dynpro Proxy Page -
    > Height Type: Fixed, Isolation Method : Embedded, Fixed Height: 80
    Web Dynpro iView  -
    > Height Type: Fixed, Isolation Method : Embedded, Fixed Height: 80
    When i view a page with PAR iViews, Only 1 scrollbar appears starting from the breadcrumb to the end of the content area.
    However, if i view a page of type Web Dynpro Proxy page with a web dynpro iview of type Web Dynpro Java Application, there are 2 scrollbars that appear.
    One starting from the breadcrumb to the end of the content area. The other for the web dynpro iView.
    I cannot change the Web Dynpro page / iView properties as these are generally ESS/MSS Business Package related pages/iViews.
    Any help is appreciated.
    Regards,
    Melwyn.

    Hi Sridhar,
    Thanks for your input.
    There are so many iViews and Pages in ESS/MSS. This is not a feasible solution.
    Also i could not locate the following:
    Chnage the Properties of Page Scrolling property.
    Is there any other solution that can be implemented.
    Regards,
    Melwyn.

Maybe you are looking for

  • Passing Multiple Parameters values to a command- ORA-00907

    I am trying to create a report in CR2008 using a SQL query against an Oracle 9i database. The field ( im."Report_No") I am using the parameter ({?CaseNo}) on is a VarChar, even though it only contains numbers. The number is 9 digits in the database (

  • Change description of excise item tab Raw material to Input material

    Hi, We have upgraded R3 4.7 to ECC 6.0 now we required in MIGO transaction Excise Item tab Indicator for Material type we need to change the description of this as RAW MATERIAL to INPUT MATERIAL and Consumable to Capital Goods which is in R3 4.7 Plea

  • ChangeTaxinj to Taxinn

    Dear All, Is it possible to change the Tax procedure Taxinj to Taxinn ?. what precaution should be taken in this procedure. is it feasible or not? please guide me its very urgent. Regards Rajesh

  • Simple question on view but solution seems to be bit confusin plz help

    i want to construct a view on top of a table with a condition: I should not modify the view each time a new column is added to table. eg: table has empno ename address grade 1 aaa US A 2 bbb US c 1 aaa US B 2 ddd AUS B I want to create a view on top

  • Connecting WRT300N to WRE54G over Cat5 wire :\

    Does that work? Again, can I connect a wireless-g range expander (WRE54G) using an ethernet network cable to a wireless-n router/gateway and get them to work together? Why? Because I already have both and there's a big gap in the middle. Mirage