Search in sources :

Example 46 with ILabel

use of com.servoy.j2db.ui.ILabel in project servoy-client by Servoy.

the class WebDataComboBox method setComponentEnabled.

public void setComponentEnabled(boolean b, boolean setLabels, boolean readOnly) {
    if (accessible || !b) {
        enabledState = b;
        super.setEnabled(b && !readOnly);
        getStylePropertyChanges().setChanged();
        if (labels != null && setLabels) {
            for (int i = 0; i < labels.size(); i++) {
                ILabel label = labels.get(i);
                label.setComponentEnabled(b);
            }
        }
    }
}
Also used : ILabel(com.servoy.j2db.ui.ILabel) Point(java.awt.Point)

Example 47 with ILabel

use of com.servoy.j2db.ui.ILabel in project servoy-client by Servoy.

the class WebItemFactory method createLabel.

public IStandardLabel createLabel(String name, String text) {
    RuntimeScriptLabel scriptable = new RuntimeScriptLabel(createChangesRecorder(), application);
    ILabel label = new WebBaseLabel(application, scriptable, name, text);
    scriptable.setComponent(label, null);
    return label;
}
Also used : ILabel(com.servoy.j2db.ui.ILabel) RuntimeScriptLabel(com.servoy.j2db.ui.scripting.RuntimeScriptLabel)

Example 48 with ILabel

use of com.servoy.j2db.ui.ILabel in project servoy-client by Servoy.

the class WebItemFactory method createInvisibleBean.

public IComponent createInvisibleBean(String name, Object obj) {
    RuntimeScriptLabel scriptable = new RuntimeScriptLabel(createChangesRecorder(), application);
    ILabel invisibleBean = new WebBeanHolder(application, scriptable, name, obj);
    scriptable.setComponent(invisibleBean, null);
    return invisibleBean;
}
Also used : ILabel(com.servoy.j2db.ui.ILabel) RuntimeScriptLabel(com.servoy.j2db.ui.scripting.RuntimeScriptLabel)

Example 49 with ILabel

use of com.servoy.j2db.ui.ILabel in project servoy-client by Servoy.

the class ComponentFactory method createWebComponentPlaceholder.

protected static IComponent createWebComponentPlaceholder(IApplication application, Form form, WebComponent webComponent) {
    RuntimeScriptLabel scriptable = new RuntimeScriptLabel(application.getItemFactory().createChangesRecorder(), application);
    ILabel label = application.getItemFactory().createScriptLabel(scriptable, getWebID(form, webComponent), false);
    scriptable.setComponent(label, webComponent);
    label.setName(webComponent.getName());
    label.setText("WebComponent '" + webComponent.getName() + "' placeholder");
    label.setSize(new Dimension(200, 20));
    return label;
}
Also used : ILabel(com.servoy.j2db.ui.ILabel) RuntimeScriptLabel(com.servoy.j2db.ui.scripting.RuntimeScriptLabel) Dimension(java.awt.Dimension)

Aggregations

ILabel (com.servoy.j2db.ui.ILabel)49 Point (java.awt.Point)40 RuntimeScriptLabel (com.servoy.j2db.ui.scripting.RuntimeScriptLabel)5 IRuntimeComponent (com.servoy.j2db.ui.runtime.IRuntimeComponent)4 IDisplayData (com.servoy.j2db.dataprocessing.IDisplayData)3 IComponent (com.servoy.j2db.ui.IComponent)3 IFieldComponent (com.servoy.j2db.ui.IFieldComponent)3 Component (org.apache.wicket.Component)3 FormComponent (org.apache.wicket.markup.html.form.FormComponent)3 RepositoryException (com.servoy.j2db.persistence.RepositoryException)2 CloseableAjaxRequestTarget (com.servoy.j2db.server.headlessclient.CloseableAjaxRequestTarget)2 MainPage (com.servoy.j2db.server.headlessclient.MainPage)2 IProviderStylePropertyChanges (com.servoy.j2db.ui.IProviderStylePropertyChanges)2 RuntimeScriptButton (com.servoy.j2db.ui.scripting.RuntimeScriptButton)2 ArrayList (java.util.ArrayList)2 HashMap (java.util.HashMap)2 List (java.util.List)2 ListItem (org.apache.wicket.markup.html.list.ListItem)2 FormController (com.servoy.j2db.FormController)1 IForm (com.servoy.j2db.IForm)1