Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /* 
  Licensed to the Apache Software Foundation (ASF) under one
  or more contributor license agreements.  See the NOTICE file
  distributed with this work for additional information
  regarding copyright ownership.  The ASF licenses this file
  to you 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 org.odftoolkit.simple.form;
 
 
FormContainer is a container which maintains Form(s) as element(s).

Since:
0.8
 
 public interface FormContainer {

Get the ODF element OfficeFormsElement which can have FormFormElement as child element directly according to ODF specification. This element will help to find the position to insert a new FormFormElement element.

Returns:
the element of office:forms
 
create and add a form into this container.

Parameters:
name - form name, represents attribute form:name
Returns:
an instance of Form
 
 	public Form createForm(String name);

Remove the form and its binding shape.

Parameters:
form - the form to be removed
Returns:
true if the form is removed successfully, false if errors happen.
 
 	public boolean removeForm(Form form);

Return a form whose name is a given value.

Parameters:
name - the name of the form
Returns:
a form whose name is a given value
 
 	public Form getFormByName(String name);

Get an iterator to traverse each form in this container.

Returns:
form iterator
 
Get the attribute form:apply-design-mode which specifies whether forms are presented in editable or non-editable state.

Returns:
true if forms in document are presented in editable state;false if forms in document are presented in completed state
 
 	public boolean getApplyDesignMode();

Get the attribute form:automatic-focus which specifies whether the consumer loading the document should set the focus to a form control.

Returns:
true if sets the focus to a form control after loading the document; false if else.
 
 	public boolean getAutomaticFocus();

Set the attribute form:apply-design-mode which specifies whether forms are presented in editable or non-editable state.

Parameters:
isDesignMode - true if forms in document are presented in editable state; false if forms in document are presented in completed state
	public void setApplyDesignMode(boolean isDesignMode);

Set the attribute form:automatic-focus which specifies whether the consumer loading the document should set the focus to a form control.

Parameters:
isAutoFocus -true if sets the focus to a form control after loading the document; false if else.
	public void setAutomaticFocus(boolean isAutoFocus);
New to GrepCode? Check out our FAQ X