Skip to content
Snippets Groups Projects
Commit fd76e052 authored by buczekp's avatar buczekp
Browse files

[LMS-1949] first version of ManagedUiDescription

SVN: 19381
parent b62775c9
No related branches found
No related tags found
No related merge requests found
/*
* Copyright 2011 ETH Zuerich, CISD
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package ch.systemsx.cisd.openbis.generic.shared.basic.dto;
import ch.systemsx.cisd.openbis.generic.shared.basic.ISerializable;
/**
* Interface implemented by objects describing a UI element (label, field, table)
*
* @author Piotr Buczek
*/
public interface IManagedWidgetDescription extends ISerializable
{
ManagedWidgetType getManagedWidgetType();
}
/*
* Copyright 2011 ETH Zuerich, CISD
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package ch.systemsx.cisd.openbis.generic.shared.basic.dto;
/**
* {@link IManagedWidgetDescription} implementation for tables
*
* @author Piotr Buczek
*/
public class ManagedTableWidgetDescription implements IManagedWidgetDescription
{
private static final long serialVersionUID = ServiceVersionHolder.VERSION;
private TypedTableModel<?> tableModel;
public ManagedTableWidgetDescription()
{
}
public void setTableModel(TypedTableModel<?> tableModel)
{
this.tableModel = tableModel;
}
public TypedTableModel<?> getTableModel()
{
return tableModel;
}
//
// IManagedWidgetDescription
//
public ManagedWidgetType getManagedWidgetType()
{
return ManagedWidgetType.TABLE;
}
}
/*
* Copyright 2011 ETH Zuerich, CISD
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package ch.systemsx.cisd.openbis.generic.shared.basic.dto;
import java.util.List;
import ch.systemsx.cisd.openbis.generic.shared.basic.ISerializable;
/**
* Object that declaratively describes a UI (labels, fields, their ordering, table content).
*
* @author Piotr Buczek
*/
public class ManagedUiDescription implements ISerializable
{
private static final long serialVersionUID = ServiceVersionHolder.VERSION;
private List<IManagedWidgetDescription> widgetDescriptions;
public ManagedUiDescription()
{
}
public List<IManagedWidgetDescription> getWidgetDescriptions()
{
return widgetDescriptions;
}
public void setWidgetDescriptions(List<IManagedWidgetDescription> widgetDescriptions)
{
this.widgetDescriptions = widgetDescriptions;
}
public void addWidgetDescription(IManagedWidgetDescription widgetDescription)
{
widgetDescriptions.add(widgetDescription);
}
}
/*
* Copyright 2011 ETH Zuerich, CISD
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package ch.systemsx.cisd.openbis.generic.shared.basic.dto;
import ch.systemsx.cisd.openbis.generic.shared.basic.ISerializable;
/**
* @author Piotr Buczek
*/
public enum ManagedWidgetType implements ISerializable
{
TABLE, LABEL, INPUT;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment