001: /*
002: *
003: *
004: * Copyright 1990-2007 Sun Microsystems, Inc. All Rights Reserved.
005: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER
006: *
007: * This program is free software; you can redistribute it and/or
008: * modify it under the terms of the GNU General Public License version
009: * 2 only, as published by the Free Software Foundation.
010: *
011: * This program is distributed in the hope that it will be useful, but
012: * WITHOUT ANY WARRANTY; without even the implied warranty of
013: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
014: * General Public License version 2 for more details (a copy is
015: * included at /legal/license.txt).
016: *
017: * You should have received a copy of the GNU General Public License
018: * version 2 along with this work; if not, write to the Free Software
019: * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
020: * 02110-1301 USA
021: *
022: * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
023: * Clara, CA 95054 or visit www.sun.com if you need additional
024: * information or have any questions.
025: */
026:
027: package javax.microedition.lcdui;
028:
029: /**
030: * Look and Feel interface used by Form.
031: * <p>
032: * See <a href="doc-files/naming.html">Naming Conventions</a>
033: * for information about method naming conventions.
034: */
035: interface FormLF extends DisplayableLF {
036:
037: /**
038: * Gets item currently in focus.
039: * @return the item currently in focus in this FormLF;
040: * if there are no items in focus, null is returned
041: */
042: Item lGetCurrentItem();
043:
044: /**
045: * Notifies look&feel object of a call to Display.setCurrentItem()
046: * Note that null can be passed in clear the previously set current item.
047: *
048: * @param item - the item in the corresponding Form to be displayed
049: */
050: void uItemMakeVisible(Item item);
051:
052: /**
053: * Notifies look&feel object of an item deleted in the corresponding
054: * Form.
055: *
056: * @param itemNum - the index of the item set
057: * @param item - the item set in the corresponding Form
058: *
059: */
060: void lSet(int itemNum, Item item);
061:
062: /**
063: * Notifies look&feel object of an item deleted in the corresponding
064: * Form.
065: *
066: * @param itemNum - the index of the deleted item
067: * @param item - the item deleted in the corresponding Form
068: *
069: */
070: void lInsert(int itemNum, Item item);
071:
072: /**
073: * Notifies look&feel object of an item deleted in the corresponding
074: * Form.
075: *
076: * @param itemNum - the index of the deleted item
077: * @param deletedItem - the item deleted in the corresponding form
078: *
079: */
080: void lDelete(int itemNum, Item deletedItem);
081:
082: /**
083: * Notifies look&feel object of an item deleted in the corresponding
084: * Form.
085: *
086: */
087: void lDeleteAll();
088:
089: /**
090: * Called by Display to notify current FormLF of a change in its peer state.
091: * If there is a ItemLF matches the peerId, the ItemLF will be called
092: * to process this notification. Otherwise, this is treated as a
093: * notification to this FormLF itself.
094: *
095: * @param modelVersion the version of the peer's data model
096: * @param itemPeerId the id of the ItemLF's peer whose state has changed
097: * @param hint some value that is interpreted only between the peers
098: */
099: void uCallPeerStateChanged(int modelVersion, int itemPeerId,
100: int hint);
101:
102: }
|