Package net.rim.blackberry.api.pdap

Examples of net.rim.blackberry.api.pdap.BlackBerryMemo


        Enumeration e;
        int iElement = 0;
        try {
            e = memoList.items();
            while( e.hasMoreElements() ) {
                BlackBerryMemo m = (BlackBerryMemo) e.nextElement();
                MemoObject memo = new MemoObject( m );
                if( testable != null ) {
                    if( testable.test( memo ) ) {
                        FindNamespace.insertElementByOrder( found, memo, orderByField, isAscending );
                        iElement++;
View Full Code Here


            final MemoObject mo = m.getMemoObject();
            if( mo != null ) {
                mo.update();
            }

            final BlackBerryMemo bbm = m.getMemo();
            final int view = m.getView();

            if( bbm == null ) {
                args = new MemoArguments( MemoArguments.ARG_NEW );
            } else {
View Full Code Here

        _view.setDataTemplateFocus(BackgroundFactory
                .createLinearGradientBackground(Color.LIGHTBLUE,
                        Color.LIGHTBLUE, Color.BLUE, Color.BLUE));
        final DataTemplate dataTemplate = new DataTemplate(_view, 1, 1) {
            public Field[] getDataFields(final int modelRowIndex) {
                final BlackBerryMemo memo =
                        (BlackBerryMemo) _model.getRow(modelRowIndex);

                final Field[] fields =
                        { new LabelField(memo
                                .getString(BlackBerryMemo.TITLE, 0),
                                Field.NON_FOCUSABLE) };
                return fields;
            }
        };
View Full Code Here

     */
    protected void makeMenu(final Menu menu, final int instance) {
        super.makeMenu(menu, instance);

        if (_model.getNumberOfRows() > 0) {
            final BlackBerryMemo memo = getSelectedMemo();

            // There is a currently selected memo, add menu items to manipulate
            // it
            menu.add(new ViewItem(memo));
            menu.add(new EditItem(memo));
View Full Code Here

    protected boolean keyChar(final char key, final int status, final int time) {

        // Open the "add memo" screen if no memo is selected, otherwise the
        // currently selected memo is shown in the "view memo" screen.
        if (key == Characters.ENTER) {
            final BlackBerryMemo memo = getSelectedMemo();

            if (memo == null) {
                _addItem.run();
            } else {
                new ViewItem(memo).run();
View Full Code Here

    /**
     * @see net.rim.device.api.ui.Screen#invokeAction(int)
     */
    public boolean invokeAction(final int action) {
        if (action == ACTION_INVOKE) {
            final BlackBerryMemo memo = getSelectedMemo();

            if (memo == null) {
                _addItem.run();
            } else {
                new ViewItem(memo).run();
View Full Code Here

        public Object doGetRow(final int modelRowIndex) {
            try {
                final Enumeration memoEnum = _memoList.items();
                int i = 0;
                while (memoEnum.hasMoreElements()) {
                    final BlackBerryMemo memo =
                            (BlackBerryMemo) memoEnum.nextElement();
                    if (i == modelRowIndex) {
                        return memo;
                    }
                    i++;
View Full Code Here

        /**
         * Creates and adds a new memo to the list, prompting the user for data
         * and notifying listeners.
         */
        public void addNewMemo() {
            final BlackBerryMemo memo = _memoList.createMemo();

            // Launch screen for user-supplied memo information
            UiApplication.getUiApplication().pushModalScreen(
                    new EditMemoScreen(memo, true));
            try {
                memo.commit();
            } catch (final PIMException e) {
                MemoApiDemo.errorDialog("addNewMemo() threw " + e.toString());
            }
            refresh();
        }
View Full Code Here

                 * @see net.rim.device.api.command.CommandHandler#execute(ReadOnlyCommandMetadata,
                 *      Object)
                 */
                public void execute(final ReadOnlyCommandMetadata metadata,
                        final Object context) {
                    final BlackBerryMemo copy =
                            MemoMainScreen.this._memoList.importMemo(_memo);

                    try {
                        copy.commit();
                        _model.refresh();
                    } catch (final PIMException e) {
                        MemoApiDemo
                                .errorDialog("BlackBerryMemo#commit() threw "
                                        + e.toString());
View Full Code Here

TOP

Related Classes of net.rim.blackberry.api.pdap.BlackBerryMemo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.