Search in sources :

Example 1 with LabelField

use of net.rim.device.api.ui.component.LabelField in project Samples-for-Java by blackberry.

the class ActivityScreen method indicateSender.

private void indicateSender() {
    icon = new BitmapField(snd_icon);
    icon_row.add(icon);
    icon_row.add(new LabelField(" - LLCP sender"));
    add(icon_row);
}
Also used : BitmapField(net.rim.device.api.ui.component.BitmapField) LabelField(net.rim.device.api.ui.component.LabelField)

Example 2 with LabelField

use of net.rim.device.api.ui.component.LabelField in project Samples-for-Java by blackberry.

the class ClientActivityScreen method emulateSmartCard.

private void emulateSmartCard() {
    icon = new BitmapField(sc_icon);
    icon_row.add(icon);
    icon_row.add(new LabelField(" - emulating smart card"));
    add(icon_row);
//        mi_response.setCommandContext(this);
//        mi_response.setCommand(new Command(new ResponseTextCommand()));
//        addMenuItem(mi_response);
}
Also used : BitmapField(net.rim.device.api.ui.component.BitmapField) LabelField(net.rim.device.api.ui.component.LabelField)

Example 3 with LabelField

use of net.rim.device.api.ui.component.LabelField in project Samples-for-Java by blackberry.

the class Banner method addTitle.

/**
	 * Add a title using the String given
	 * 
	 * @param title
	 * @since 1.2
	 */
public void addTitle(String title) {
    if (this.title instanceof LabelField) {
        LabelField titleLabel = (LabelField) this.title;
        titleLabel.setText(title);
    } else {
        if (this.title != null) {
            this.delete(this.title);
        }
        this.title = new Title(title, Title.ELLIPSIS);
        add(this.title);
    }
}
Also used : LabelField(net.rim.device.api.ui.component.LabelField)

Example 4 with LabelField

use of net.rim.device.api.ui.component.LabelField in project Samples-for-Java by blackberry.

the class NfcVirtTargScreen method emulateSmartCard.

private void emulateSmartCard() {
    icon = new BitmapField(sc_icon);
    icon_row.add(icon);
    icon_row.add(new LabelField(" - emulating smart card"));
    add(icon_row);
    mi_response.setCommandContext(this);
    mi_response.setCommand(new Command(new ResponseTextCommand()));
    addMenuItem(mi_response);
    startEmulationOfISO14443ATarget();
}
Also used : BitmapField(net.rim.device.api.ui.component.BitmapField) StartCommand(nfc.sample.virtual.target.commands.StartCommand) Command(net.rim.device.api.command.Command) ResponseTextCommand(nfc.sample.virtual.target.commands.ResponseTextCommand) StopCommand(nfc.sample.virtual.target.commands.StopCommand) LabelField(net.rim.device.api.ui.component.LabelField) ResponseTextCommand(nfc.sample.virtual.target.commands.ResponseTextCommand)

Example 5 with LabelField

use of net.rim.device.api.ui.component.LabelField in project Samples-for-Java by blackberry.

the class StartScreen method searchResponse.

// ResponseListener Implementation
public void searchResponse(Vector results) {
    if (results != null && results.size() > 0) {
        // Create the list of videos
        GridFieldManager resultsList = new GridFieldManager(results.size() * 2, 2, GridFieldManager.USE_ALL_WIDTH | GridFieldManager.USE_ALL_HEIGHT);
        resultsList.setColumnProperty(0, GridFieldManager.PREFERRED_SIZE, 0);
        resultsList.setColumnProperty(1, GridFieldManager.AUTO_SIZE, 0);
        resultsList.setColumnPadding(1);
        resultsList.setCellPadding(0);
        for (int i = 0; i < results.size(); i++) {
            VideoData data = (VideoData) results.elementAt(i);
            // Thumbnail
            BitmapFieldButton image = new BitmapFieldButton(_clock, BitmapField.FOCUSABLE);
            image.setSpace(2, 2);
            image.setCommandAction(new ThumbnailClick(data));
            data.setBitmapField(image);
            resultsList.add(image);
            // Text column
            VerticalFieldManager vfm = new VerticalFieldManager();
            vfm.add(new LabelField(data.getTitle(), LabelField.NON_FOCUSABLE));
            vfm.add(new LabelField(data.getDescription(), LabelField.USE_ALL_HEIGHT | LabelField.NON_FOCUSABLE | LabelField.ELLIPSIS));
            resultsList.add(vfm);
            // Break
            resultsList.add(new NullField(NullField.NON_FOCUSABLE));
            resultsList.add(new SeparatorField());
        }
        UiApplication.getUiApplication().invokeLater(new ResultsUpdater(resultsList));
    }
}
Also used : VideoData(com.blackberry.toolkit.sample.youtube.internal.VideoData) NullField(net.rim.device.api.ui.component.NullField) GridFieldManager(net.rim.device.api.ui.container.GridFieldManager) SeparatorField(net.rim.device.api.ui.component.SeparatorField) VerticalFieldManager(net.rim.device.api.ui.container.VerticalFieldManager) LabelField(net.rim.device.api.ui.component.LabelField)

Aggregations

LabelField (net.rim.device.api.ui.component.LabelField)7 BitmapField (net.rim.device.api.ui.component.BitmapField)5 VideoData (com.blackberry.toolkit.sample.youtube.internal.VideoData)1 Command (net.rim.device.api.command.Command)1 NullField (net.rim.device.api.ui.component.NullField)1 SeparatorField (net.rim.device.api.ui.component.SeparatorField)1 GridFieldManager (net.rim.device.api.ui.container.GridFieldManager)1 VerticalFieldManager (net.rim.device.api.ui.container.VerticalFieldManager)1 ResponseTextCommand (nfc.sample.virtual.target.commands.ResponseTextCommand)1 StartCommand (nfc.sample.virtual.target.commands.StartCommand)1 StopCommand (nfc.sample.virtual.target.commands.StopCommand)1