return;
}
- String[] parameters = new String[] { "--sprite-png-depth", "AUTO",
+ String[] parameters = { "--sprite-png-depth", "AUTO",
"--css-file-suffix", "-sprite", "--css-file-encoding", "UTF-8",
"--root-dir-path", themeFolder + File.separator + themeName,
"--log-level", "WARN" };
JClassType serializerInterface = oracle
.findType(JSONSerializer.class.getName());
- JType[] deserializeParamTypes = new JType[] {
+ JType[] deserializeParamTypes = {
oracle.findType(
com.vaadin.client.metadata.Type.class.getName()),
oracle.findType(JsonValue.class.getName()),
if (isEnabled()) {
double now = Duration.currentTimeMillis();
- String[] keys = new String[] { "navigationStart",
+ String[] keys = { "navigationStart",
"unloadEventStart", "unloadEventEnd", "redirectStart",
"redirectEnd", "fetchStart", "domainLookupStart",
"domainLookupEnd", "connectStart", "connectEnd",
protected class Menu extends VOverlay {
FlowPanel content = new FlowPanel();
- DebugButton[] sizes = new DebugButton[] {
+ DebugButton[] sizes = {
new DebugButton(null, "Small", "A"),
new DebugButton(null, "Medium", "A"),
new DebugButton(null, "Large", "A") };
- DebugButton[] modes = new DebugButton[] {
+ DebugButton[] modes = {
new DebugButton(Icon.DEVMODE_OFF,
"Debug only (causes page reload)"),
new DebugButton(Icon.DEVMODE_ON,
}-*/;
public void sendRpc(String name, JsArray<JavaScriptObject> arguments) {
- Object[] parameters = new Object[] { name, Util.jso2json(arguments) };
+ Object[] parameters = { name, Util.jso2json(arguments) };
/*
* Must invoke manually as the RPC interface can't be used in GWT
}
- protected String[] acceptedTypes = new String[] { "Text", "Url",
+ protected String[] acceptedTypes = { "Text", "Url",
"text/html", "text/plain", "text/rtf" };
private boolean isAcceptedType(String type) {
private final FastStringMap<LayoutDependency>[] dependenciesInDirection = new FastStringMap[] {
FastStringMap.create(), FastStringMap.create() };
- private final FastStringSet[] measureQueueInDirection = new FastStringSet[] {
+ private final FastStringSet[] measureQueueInDirection = {
FastStringSet.create(), FastStringSet.create() };
- private final FastStringSet[] layoutQueueInDirection = new FastStringSet[] {
+ private final FastStringSet[] layoutQueueInDirection = {
FastStringSet.create(), FastStringSet.create() };
private final ApplicationConnection connection;
}
}
- private static final RichTextArea.FontSize[] fontSizesConstants = new RichTextArea.FontSize[] {
+ private static final RichTextArea.FontSize[] fontSizesConstants = {
RichTextArea.FontSize.XX_SMALL, RichTextArea.FontSize.X_SMALL,
RichTextArea.FontSize.SMALL, RichTextArea.FontSize.MEDIUM,
RichTextArea.FontSize.LARGE, RichTextArea.FontSize.X_LARGE,
public class ApplicationConnectionURLGenerationTest {
- private static final String[] URIS = new String[] {
+ private static final String[] URIS = {
"http://demo.vaadin.com/", //
"https://demo.vaadin.com/", "http://demo.vaadin.com/foo",
"http://demo.vaadin.com/foo?f", "http://demo.vaadin.com/foo?f=1",
"http://vaadin.com/directory?p_p_id=Directory_WAR_Directory&p_p_lifecycle=2&p_p_state=normal&p_p_mode=view&p_p_resource_id=UIDL&p_p_cacheability=cacheLevelPage&p_p_col_id=row-1&p_p_col_count=1",
};
- private static final String[] URIS_WITH_ABCD_PARAM = new String[] {
+ private static final String[] URIS_WITH_ABCD_PARAM = {
"http://demo.vaadin.com/?a=b&c=d",
"https://demo.vaadin.com/?a=b&c=d",
"http://demo.vaadin.com/foo?a=b&c=d",
};
- private static final String[] URIS_WITH_ABCD_PARAM_AND_FRAGMENT = new String[] {
+ private static final String[] URIS_WITH_ABCD_PARAM_AND_FRAGMENT = {
"http://demo.vaadin.com/?a=b&c=d#fragment",
"https://demo.vaadin.com/?a=b&c=d#fragment",
"http://demo.vaadin.com/foo?a=b&c=d#fragment",
} else {
// FIXME Use dts.getAmPmStrings(); and make sure that
// DateTimeService has a some Locale set.
- String[] ampm = new String[] { "AM", "PM" };
+ String[] ampm = { "AM", "PM" };
int amStop = (lastHour < 11) ? lastHour : 11;
int pmStart = (firstHour > 11) ? firstHour % 11 : 0;
}
}
- private static final RichTextArea.FontSize[] fontSizesConstants = new RichTextArea.FontSize[] {
+ private static final RichTextArea.FontSize[] fontSizesConstants = {
RichTextArea.FontSize.XX_SMALL, RichTextArea.FontSize.X_SMALL,
RichTextArea.FontSize.SMALL, RichTextArea.FontSize.MEDIUM,
RichTextArea.FontSize.LARGE, RichTextArea.FontSize.X_LARGE,
*
* If more rows were added than the new escalator rows can
* account for, we need to start to spin the escalator to update
- * the remaining rows aswell.
+ * the remaining rows as well.
*/
final int rowsStillNeeded = numberOfRows - addedRows.size();
return null;
}
+ @SuppressWarnings("unchecked")
private <T extends Field> T createDateField(Class<?> type,
Class<T> fieldType) {
- AbstractField field;
+ AbstractField<?> field;
if (InlineDateField.class.isAssignableFrom(fieldType)) {
field = new InlineDateField();
}
}
- private File[] roots = new File[] {};
+ private File[] roots = {};
private FilenameFilter filter = null;
@Override
public void writeDesign(Element design, DesignContext designContext) {
super.writeDesign(design, designContext);
- AbstractField def = (AbstractField) designContext
+ AbstractField<?> def = designContext
.getDefaultInstance(this);
Attributes attr = design.attributes();
// handle readonly
* List of primitive classes. Google App Engine has problems
* serializing/deserializing these (#3064).
*/
- private static final Class<?>[] primitiveClasses = new Class<?>[] {
+ private static final Class<?>[] primitiveClasses = {
byte.class, short.class, int.class, long.class, float.class,
double.class, boolean.class, char.class };
@SuppressWarnings({ "rawtypes" })
public void testCorrectTypeForFormat()
throws InstantiationException, IllegalAccessException {
- Class[] testedTypes = new Class[] { Integer.class, Boolean.class,
+ Class[] testedTypes = { Integer.class, Boolean.class,
Double.class, String.class, Date.class };
- Object[] testValues = new Object[] { new Integer(3), Boolean.FALSE,
- new Double(3.3), "bar", new Date() };
+ Object[] testValues = { 3, false,
+ 3.3D, "bar", new Date() };
int i = 0;
for (Class class1 : testedTypes) {
}
}
- String[] names = new String[] { "Antti", "Ville", "Sirkka", "Jaakko",
+ String[] names = { "Antti", "Ville", "Sirkka", "Jaakko",
"Pekka", "John" };
- int[] ages = new int[] { 10, 20, 50, 12, 64, 67 };
- String[] sortedByAge = new String[] { names[0], names[3], names[1],
+ int[] ages = { 10, 20, 50, 12, 64, 67 };
+ String[] sortedByAge = { names[0], names[3], names[1],
names[2], names[4], names[5] };
public BeanItemContainer<Person> getContainer() {
RowId two = new RowId(new Object[] { 2 + offset });
RowId three = new RowId(new Object[] { 3 + offset });
if (SQLTestsConstants.db == DB.ORACLE) {
- String[] correct = new String[] { "1", "2", "3", "4" };
+ String[] correct = { "1", "2", "3", "4" };
List<String> oracle = new ArrayList<String>();
for (Object o : itemIds) {
oracle.add(o.toString());
RowId two = new RowId(new Object[] { 2 + offset });
RowId three = new RowId(new Object[] { 3 + offset });
if (SQLTestsConstants.db == DB.ORACLE) {
- String[] correct = new String[] { "1", "2", "3", "4" };
+ String[] correct = { "1", "2", "3", "4" };
List<String> oracle = new ArrayList<String>();
for (Object o : itemIds) {
oracle.add(o.toString());
@Test
public void testValueOutOfRange() {
- Double[] values = new Double[] { Byte.MAX_VALUE * 2.0,
+ Double[] values = { Byte.MAX_VALUE * 2.0,
Byte.MIN_VALUE * 2.0, Long.MAX_VALUE * 2.0,
Long.MIN_VALUE * 2.0 };
@Test
public void testValueOutOfRange() {
- Double[] values = new Double[] { Integer.MAX_VALUE * 2.0,
+ Double[] values = { Integer.MAX_VALUE * 2.0,
Integer.MIN_VALUE * 2.0, Long.MAX_VALUE * 2.0,
Long.MIN_VALUE * 2.0 };
@Test
public void testValueOutOfRange() {
- Double[] values = new Double[] { Integer.MAX_VALUE * 2.0,
+ Double[] values = { Integer.MAX_VALUE * 2.0,
Integer.MIN_VALUE * 2.0, Long.MAX_VALUE * 2.0,
Long.MIN_VALUE * 2.0 };
public void testReorderColumns() {
Set<?> containerProperties = new LinkedHashSet<Object>(
grid.getContainerDataSource().getContainerPropertyIds());
- Object[] properties = new Object[] { "column3", "column2", "column6" };
+ Object[] properties = { "column3", "column2", "column6" };
grid.setColumnOrder(properties);
int i = 0;
@Test
public void testSingleCauseException() {
Table table = new Table();
- Throwable[] causes = new Throwable[] {
+ Throwable[] causes = {
new RuntimeException("Broken in one way.") };
CacheUpdateException exception = new CacheUpdateException(table,
@Test
public void testMultipleCauseException() {
Table table = new Table();
- Throwable[] causes = new Throwable[] {
+ Throwable[] causes = {
new RuntimeException("Broken in the first way."),
new RuntimeException("Broken in the second way.") };
int properties = 5;
Table t = TableGeneratorTest.createTableWithDefaultContainer(properties,
10);
- Align[] explicitAlignments = new Align[] { Align.CENTER, Align.LEFT,
+ Align[] explicitAlignments = { Align.CENTER, Align.LEFT,
Align.RIGHT, Align.RIGHT, Align.LEFT };
t.setColumnAlignments(explicitAlignments);
@Test
public void invalidColumnAlignmentStrings() {
Table t = TableGeneratorTest.createTableWithDefaultContainer(3, 7);
- Align[] defaultAlignments = new Align[] { Align.LEFT, Align.LEFT,
+ Align[] defaultAlignments = { Align.LEFT, Align.LEFT,
Align.LEFT };
try {
t.setColumnAlignments(new Align[] { Align.RIGHT, Align.RIGHT });
@Test
public void columnAlignmentForPropertyNotInContainer() {
Table t = TableGeneratorTest.createTableWithDefaultContainer(3, 7);
- Align[] defaultAlignments = new Align[] { Align.LEFT, Align.LEFT,
+ Align[] defaultAlignments = { Align.LEFT, Align.LEFT,
Align.LEFT };
try {
t.setColumnAlignment("Property 1200", Align.LEFT);
@Test
public void invalidColumnAlignmentsLength() {
Table t = TableGeneratorTest.createTableWithDefaultContainer(7, 7);
- Align[] defaultAlignments = new Align[] { Align.LEFT, Align.LEFT,
+ Align[] defaultAlignments = { Align.LEFT, Align.LEFT,
Align.LEFT, Align.LEFT, Align.LEFT, Align.LEFT, Align.LEFT };
try {
int properties = 5;
Table t = TableGeneratorTest.createTableWithDefaultContainer(properties,
10);
- Align[] explicitAlignments = new Align[] { Align.CENTER, Align.LEFT,
+ Align[] explicitAlignments = { Align.CENTER, Align.LEFT,
Align.RIGHT, Align.RIGHT, Align.LEFT };
- Align[] currentAlignments = new Align[] { Align.LEFT, Align.LEFT,
+ Align[] currentAlignments = { Align.LEFT, Align.LEFT,
Align.LEFT, Align.LEFT, Align.LEFT };
for (int i = 0; i < properties; i++) {
public class TableVisibleColumnsTest {
- String[] defaultColumns3 = new String[] { "Property 0", "Property 1",
+ String[] defaultColumns3 = { "Property 0", "Property 1",
"Property 2" };
@Test
@Test
public void explicitVisibleColumns() {
Table t = TableGeneratorTest.createTableWithDefaultContainer(5, 10);
- Object[] newVisibleColumns = new Object[] { "Property 1",
+ Object[] newVisibleColumns = { "Property 1",
"Property 2" };
t.setVisibleColumns(newVisibleColumns);
assertArrayEquals("Explicit visible columns, 5 properties",
return l;
}
- private static final String[] customAttributes = new String[] { "width",
+ private static final String[] customAttributes = { "width",
"height", "debug-id", "error", "width-auto", "height-auto",
"width-full", "height-full", "size-auto", "size-full", "immediate",
"locale", "read-only", "_id" };
public class StrBean implements Serializable {
- private static final String[] values = new String[] { "Foo", "Bar", "Baz" };
+ private static final String[] values = { "Foo", "Bar", "Baz" };
private String value;
private final int id;
@Test
public void testValueOutOfRange() {
- Double[] values = new Double[] { Integer.MAX_VALUE * 2.0,
+ Double[] values = { Integer.MAX_VALUE * 2.0,
Integer.MIN_VALUE * 2.0, Long.MAX_VALUE * 2.0,
Long.MIN_VALUE * 2.0 };
public class AddComponentsTest {
- Component[] children = new Component[] { new Label("A"), new Label("B"),
+ Component[] children = { new Label("A"), new Label("B"),
new Label("C"), new Label("D") };
@Test
* @author Vaadin Ltd
*/
public class ComboBoxFilteringTest {
- private static final String[] PERSON_NAMES = new String[] {
+ private static final String[] PERSON_NAMES = {
"Enrique Iglesias", "Henry Dunant", "Erwin Engelbrecht" };
private ComboBox<Person> comboBox;
public class AddComponentsTest {
- private final Component[] children = new Component[] { new Label("A"),
+ private final Component[] children = { new Label("A"),
new Label("B"), new Label("C"), new Label("D") };
@Test
import com.vaadin.ui.Layout;
public class GridLayoutTest {
- Component[] children = new Component[] { new Label("A"), new Label("B"),
+ Component[] children = { new Label("A"), new Label("B"),
new Label("C"), new Label("D") };
@Test
return getLayout().getComponentCount();
}
- Component[] children = new Component[] { new Label("A"), new Label("B"),
+ Component[] children = { new Label("A"), new Label("B"),
new Label("C"), new Label("D") };
@Test
};
- final int[] count = new int[] { 0 };
+ final int[] count = { 0 };
Navigator navigator = new Navigator(createMockUI(), manager,
EasyMock.createMock(ViewDisplay.class)) {
@Override
}
}
- private static final String[] ITEM_ARRAY = new String[] { "Foo", "Bar",
+ private static final String[] ITEM_ARRAY = { "Foo", "Bar",
"Baz" };
private TestListing listing;
return t;
}
- static String[] testString = new String[] { "Jacob", "Michael", "Joshua",
+ static String[] testString = { "Jacob", "Michael", "Joshua",
"Matthew", "Ethan", "Andrew", "Daniel", "Anthony", "Christopher",
"Joseph", "William", "Alexander", "Ryan", "David", "Nicholas",
"Tyler", "James", "John", "Jonathan", "Nathan", "Samuel",
*/
public class TestForPreconfiguredComponents extends CustomComponent {
- private static final String[] firstnames = new String[] { "John", "Mary",
+ private static final String[] firstnames = { "John", "Mary",
"Joe", "Sarah", "Jeff", "Jane", "Peter", "Marc", "Josie", "Linus" };
- private static final String[] lastnames = new String[] { "Torvalds",
+ private static final String[] lastnames = { "Torvalds",
"Smith", "Jones", "Beck", "Sheridan", "Picard", "Hill", "Fielding",
"Einstein" };
return t;
}
- static String[] testString = new String[] { "Jacob", "Michael", "Joshua",
+ static String[] testString = { "Jacob", "Michael", "Joshua",
"Matthew", "Ethan", "Andrew", "Daniel", "Anthony", "Christopher",
"Joseph", "William", "Alexander", "Ryan", "David", "Nicholas",
"Tyler", "James", "John", "Jonathan", "Nathan", "Samuel",
*/
public class TestForTrees extends CustomComponent implements Handler {
- private static final String[] firstnames = new String[] { "John", "Mary",
+ private static final String[] firstnames = { "John", "Mary",
"Joe", "Sarah", "Jeff", "Jane", "Peter", "Marc", "Josie", "Linus" };
- private static final String[] lastnames = new String[] { "Torvalds",
+ private static final String[] lastnames = { "Torvalds",
"Smith", "Jones", "Beck", "Sheridan", "Picard", "Hill", "Fielding",
"Einstein" };
private final VerticalLayout main = new VerticalLayout();
- private final Action[] actions = new Action[] { new Action("edit"),
+ private final Action[] actions = { new Action("edit"),
new Action("delete") };
private VerticalLayout al;
}
public void populateSelect() {
- final String[] names = new String[] { "John", "Mary", "Joe", "Sarah",
+ final String[] names = { "John", "Mary", "Joe", "Sarah",
"Jeff", "Jane", "Peter", "Marc", "Josie", "Linus" };
for (int j = 0; j < 4; j++) {
Integer id = new Integer(sequence++);
}
public void createExampleTasks() {
- final String[] assignedTo = new String[] { "John", "Mary", "Joe",
+ final String[] assignedTo = { "John", "Mary", "Joe",
"Sarah", "Jeff", "Jane", "Peter", "Marc", "Josie", "Linus" };
- final String[] type = new String[] { "Enhancement", "Bugfix", "Testing",
+ final String[] type = { "Enhancement", "Bugfix", "Testing",
"Task" };
for (int j = 0; j < 100; j++) {
final Task task = new Task(
addActionHandler(new Action.Handler() {
- private Action[] actions;
- {
- actions = new Action[] { new Action("test1") };
- }
+ private Action[] actions = { new Action("test1") };
@Override
public Action[] getActions(Object target, Object sender) {
// The operations for the calculator in the order they appear on the
// screen (left to right, top to bottom)
- String[] operations = new String[] { "7", "8", "9", "/", "4", "5", "6",
+ String[] operations = { "7", "8", "9", "/", "4", "5", "6",
"*", "1", "2", "3", "-", "0", "=", "C", "+" };
for (String caption : operations) {
// addCommands.put("HorizontalLayout", addHorizontalLayoutCommand);
// addCommands.put("VerticalLayout", addVerticalLayoutCommand);
- ComponentSize[] sizes = new ComponentSize[] {
+ ComponentSize[] sizes = {
new ComponentSize(null, null), new ComponentSize("200px", null),
new ComponentSize("100%", null),
new ComponentSize(null, "200px"),
String heightCategory = "Change component height";
createCategory(heightCategory, category);
- String[] options = new String[] { "100px", "200px", "50%", "100%" };
+ String[] options = { "100px", "200px", "50%", "100%" };
for (int i = 0; i < 20; i++) {
String componentWidthCategory = "Component " + i + " width";
String componentHeightCategory = "Component " + i + " height";
@Override
protected String getDescription() {
- return "Tests the disable state is cascaded correctly to children. Disabling a parent should disabled its children aswell. The buttons only toggle the state of the target component.";
+ return "Tests the disable state is cascaded correctly to children. Disabling a parent should disabled its children as well. The buttons only toggle the state of the target component.";
}
@Override
table.addActionHandler(new Handler() {
- Action[] actions = new Action[] { new Action("FOO"),
+ Action[] actions = { new Action("FOO"),
new Action("BAR"), new Action("CAR") };
@Override
private static final String TYPE_EMBEDDED = "Embedded";
private static final String TYPE_CAPTION = "In caption";
- private static final String[] icons = new String[] { "arrow-down.png",
+ private static final String[] icons = { "arrow-down.png",
"arrow-left.png", "arrow-right.png", "arrow-up.png",
"attention.png", "calendar.png", "cancel.png", "document.png",
"document-add.png", "document-delete.png", "document-doc.png",
"lock.png", "note.png", "ok.png", "reload.png", "settings.png",
"trash.png", "trash-full.png", "user.png", "users.png" };
- private static final String[] sizes = new String[] { "16", "32", "64" };
+ private static final String[] sizes = { "16", "32", "64" };
private ComponentContainer container = new VerticalLayout();
import com.vaadin.v7.ui.ComboBox;
public class ComboBoxCombinedWithEnterShortcut extends TestBase {
- final String[] cities = new String[] { "Berlin", "Brussels", "Helsinki",
+ final String[] cities = { "Berlin", "Brussels", "Helsinki",
"Madrid", "Oslo", "Paris", "Stockholm" };
private Log log = new Log(5);
@Widgetset("com.vaadin.DefaultWidgetSet")
public class ComboBoxVaadinIcons extends AbstractTestUI {
- public static final VaadinIcons[] icons = new VaadinIcons[] {
+ public static final VaadinIcons[] icons = {
VaadinIcons.AMBULANCE, VaadinIcons.PAPERPLANE,
VaadinIcons.AIRPLANE };
@SuppressWarnings("serial")
public class DateFields extends ComponentTestCase<DateField> {
- private static final Locale[] LOCALES = new Locale[] { Locale.US,
+ private static final Locale[] LOCALES = { Locale.US,
Locale.TAIWAN, new Locale("fi", "FI") };
@Override
@SuppressWarnings("serial")
public class InlineDateFields extends ComponentTestCase<InlineDateField> {
- private static final Locale[] LOCALES = new Locale[] { Locale.US,
+ private static final Locale[] LOCALES = { Locale.US,
Locale.TAIWAN, new Locale("fi", "FI") };
@Override
private PersonContainer container;
private Grid grid;
- private boolean styles[] = new boolean[] { false, false, false };
+ private boolean styles[] = { false, false, false };
@Override
protected void setup(VaadinRequest request) {
new NativeSelect());
// Lets populate the table with random data
- String[] tracks = new String[] { "Red Flag", "Millstone", "Not The Sun",
+ String[] tracks = { "Red Flag", "Millstone", "Not The Sun",
"Breath", "Here We Are", "Deep Heaven", "Her Voice Resides",
"Natural Tan", "End It All", "Kings", "Daylight Slaving",
"Mad Man", "Resolve", "Teargas", "African Air",
"Passing Bird" };
- String[] times = new String[] { "4:12", "6:03", "5:43", "4:32", "3:42",
+ String[] times = { "4:12", "6:03", "5:43", "4:32", "3:42",
"4:45", "2:56", "9:34", "2:10", "3:44", "5:49", "6:30", "5:18",
"7:42", "3:13", "2:52" };
- String[] artists = new String[] { "Billy Talent", "Brand New",
+ String[] artists = { "Billy Talent", "Brand New",
"Breaking Benjamin", "Becoming The Archetype",
"Bullet For My Valentine", "Chasing Victory", "Chimaira",
"Danko Jones", "Deadlock", "Deftones", "From Autumn To Ashes",
"Haste The Day", "Four Year Strong", "In Flames", "Kemopetrol",
"John Legend" };
- String[] albums = new String[] { "Once Again", "The Caitiff Choir",
+ String[] albums = { "Once Again", "The Caitiff Choir",
"The Devil And God", "Light Grenades", "Dicthonomy",
"Back In Black", "Dreamer", "Come Clarity", "Year Zero",
"Frames", "Fortress", "Phobia", "The Poison", "Manifesto",
"White Pony", "The Big Dirty" };
- String[] genres = new String[] { "Rock", "Metal", "Hardcore", "Indie",
+ String[] genres = { "Rock", "Metal", "Hardcore", "Indie",
"Pop", "Alternative", "Blues", "Jazz", "Hip Hop", "Electronica",
"Punk", "Hard Rock", "Dance", "R'n'B", "Gospel", "Country" };
for (int i = 0; i < 1000; i++) {
private Handler actionHandler = new Handler() {
ShortcutAction save = new ShortcutAction("^Save");
- private Action[] actions = new Action[] { save };
+ private Action[] actions = { save };
@Override
public void handleAction(Action action, Object sender, Object target) {
table.addActionHandler(new Handler() {
final Action H = new Action("Toggle Col2");
- final Action[] actions = new Action[] { H };
+ final Action[] actions = { H };
@Override
public Action[] getActions(Object target, Object sender) {
private String genValue() {
Random rnd = new Random();
- StringBuffer str = new StringBuffer("");
- String[] strings = new String[] { "foo", "bar", "baz" };
+ StringBuffer str = new StringBuffer();
+ String[] strings = { "foo", "bar", "baz" };
for (int i = 0; i < 5; i++) {
str.append(strings[Math.abs(rnd.nextInt() % strings.length)])
.append(" ");
}
private static final String TABLE_NAME = "JOBS";
- private static final String[] PK_COLUMN_NAMES = new String[] { "JOB_ID" };
+ private static final String[] PK_COLUMN_NAMES = { "JOB_ID" };
private static final String SEQUENCE_NAME = "";
private static final String VERSION_COLUMN_NAME = "";
public class TableToggleVisibility extends AbstractTestCase {
- private static final int[] LENGTHS = new int[] { 20, 22, 10 };
+ private static final int[] LENGTHS = { 20, 22, 10 };
@Override
public void init() {
public class TableVisibleColumnsUpdate extends AbstractReindeerTestUI {
- private String[] cols1 = new String[] { "p1", "p2", "p3" };
- private String[] cols2 = new String[] { "p1", "p4", "p3" };
+ private String[] cols1 = { "p1", "p2", "p3" };
+ private String[] cols2 = { "p1", "p4", "p3" };
private Table table;
@Override
createCategory(captionCategory, category);
createCategory(iconCategory, category);
- String captionOptions[] = new String[] { "", "{id}", "Tab {id}",
+ String captionOptions[] = { "", "{id}", "Tab {id}",
"A long caption for tab {id}" };
LinkedHashMap<String, Resource> iconOptions = new LinkedHashMap<>();
iconOptions.put("-", null);
*/
private class VaadinDeveloperNameField extends TextField
implements HasValue.ValueChangeListener<String> {
- private String[] names = new String[] { "Matti Tahvonen",
+ private String[] names = { "Matti Tahvonen",
"Marc Englund", "Joonas Lehtinen", "Jouni Koivuviita",
"Marko Grönroos", "Artur Signell" };
*
*/
private class VaadinDeveloperNameField extends TextField {
- private String[] names = new String[] { "Matti Tahvonen",
+ private String[] names = { "Matti Tahvonen",
"Marc Englund", "Joonas Lehtinen", "Jouni Koivuviita",
"Marko Grönroos", "Artur Signell" };
@Widgetset("com.vaadin.DefaultWidgetSet")
public class TreeBasicFeatures extends AbstractTestUIWithLog {
- public static final double[] ROW_HEIGHTS = new double[] { 35.5d, 72.78d };
+ public static final double[] ROW_HEIGHTS = { 35.5d, 72.78d };
private Tree<HierarchicalTestBean> tree;
private TreeDataProvider<HierarchicalTestBean> inMemoryDataProvider;
private final Action ACTION_MARK = new Action("Mark");
private final Action ACTION_UNMARK = new Action("Unmark");
private final Action ACTION_LOG = new Action("Save");
- private final Action[] ACTIONS_UNMARKED = new Action[] { ACTION_MARK,
+ private final Action[] ACTIONS_UNMARKED = { ACTION_MARK,
ACTION_LOG };
- private final Action[] ACTIONS_MARKED = new Action[] { ACTION_UNMARK,
+ private final Action[] ACTIONS_MARKED = { ACTION_UNMARK,
ACTION_LOG };
public TablesCssTest(TestSampler parent) {
// Actions for the context menu
final Action ACTION_ADD = new Action("Add child item");
final Action ACTION_DELETE = new Action("Delete");
- final Action[] ACTIONS = new Action[] { ACTION_ADD, ACTION_DELETE };
+ final Action[] ACTIONS = { ACTION_ADD, ACTION_DELETE };
final Tree tree = new Tree();
tree.setId("tree" + debugIdCounter++);
}
private HierarchicalContainer createHierarchicalContainer() {
- String[] itemNames = new String[] { "Foo", "Baar" };
+ String[] itemNames = { "Foo", "Baar" };
HierarchicalContainer hc = new HierarchicalContainer();
hc.addContainerProperty("NAME", String.class, null);
}
private HierarchicalContainer createHierarchicalContainer() {
- String[] itemNames = new String[] { "Foo", "Baar" };
+ String[] itemNames = { "Foo", "Baar" };
HierarchicalContainer hc = new HierarchicalContainer();
hc.addContainerProperty("NAME", String.class, null);
protected String formatSize(double contentLength) {
double d = contentLength;
int suffix = 0;
- String[] suffixes = new String[] { "B", "KB", "MB", "GB", "TB" };
+ String[] suffixes = { "B", "KB", "MB", "GB", "TB" };
while (d > 1024) {
suffix++;
d /= 1024.0;
window.addActionHandler(new Handler() {
- private Action[] s = new Action[] { new ShortcutAction("^Save") };
+ private Action[] s = { new ShortcutAction("^Save") };
@Override
public Action[] getActions(Object target, Object sender) {
private static void populateContainer(IndexedContainer container) {
container.removeAllItems();
- String[] strings = new String[] { "Text 1", "Text 2", "true", "false",
+ String[] strings = { "Text 1", "Text 2", "true", "false",
"Caption 1", "Caption 2" };
for (String s : strings) {
Object id = container.addItem();
java.util.Random r = new java.util.Random(1);
- File[] files = new File[] { new Folder("Docs"), new Folder("Music"),
+ File[] files = { new Folder("Docs"), new Folder("Music"),
new Folder("Images"), new File("document.doc"),
new File("song.mp3"), new File("photo.jpg") };
Handler actionHandler = new Handler() {
- private Action[] actions = new Action[] { new Action("Remove") };
+ private Action[] actions = { new Action("Remove") };
@Override
public void handleAction(Action action, Object sender,
}
- String[] knownTypes = new String[] { "image/png", "text/csv" };
+ String[] knownTypes = { "image/png", "text/csv" };
private boolean canDisplay(String type) {
if (type != null) {
HashMap<String, InventoryObject> inventoryStore = new HashMap<>();
public HierarchicalContainer createTreeContent() {
- final Object[] inventory = new Object[] {
+ final Object[] inventory = {
new InventoryObject("root", 0.0, true),
new InventoryObject("+5 Quarterstaff (blessed)", 3.5, false),
new InventoryObject("+3 Elven Dagger (blessed)", 0.2, false),
private void addMultiSelectComponents() {
List<MultiSelect<String>> components = new ArrayList<>();
- components.add(new ListSelect("", createData()));
- components.add(new CheckBoxGroup("", createData()));
- components.add(new TwinColSelect("", createData()));
+ components.add(new ListSelect<>("", createData()));
+ components.add(new CheckBoxGroup<>("", createData()));
+ components.add(new TwinColSelect<>("", createData()));
components.forEach(c -> {
c.select(TEST_STRING_VALUE);
c.addValueChangeListener(event -> {
private AbstractField<?>[] fields = { new TextArea(), new TextField(),
new DateField(), new PasswordField(), new CheckBox(),
new RichTextArea(), new Slider() };
- private AbstractMultiSelect<?>[] multiSelects = { new ListSelect(),
- new CheckBoxGroup(), new TwinColSelect() };
- private AbstractSingleSelect<?>[] singleSelects = { new ComboBox(),
- new NativeSelect(), new RadioButtonGroup() };
+ private AbstractMultiSelect<?>[] multiSelects = { new ListSelect<Object>(),
+ new CheckBoxGroup<Object>(), new TwinColSelect<Object>() };
+ private AbstractSingleSelect<?>[] singleSelects = { new ComboBox<Object>(),
+ new NativeSelect<Object>(), new RadioButtonGroup<Object>() };
@Override
protected void setup(VaadinRequest request) {
- for (AbstractField field : fields) {
+ for (AbstractField<?> field : fields) {
field.setReadOnly(true);
addComponent(field);
}
- for (AbstractMultiSelect multiSelect : multiSelects) {
+ for (AbstractMultiSelect<?> multiSelect : multiSelects) {
multiSelect.setReadOnly(true);
addComponent(multiSelect);
}
- for (AbstractSingleSelect singleSelect : singleSelects) {
+ for (AbstractSingleSelect<?> singleSelect : singleSelects) {
singleSelect.setReadOnly(true);
addComponent(singleSelect);
}
public abstract class AbstractBasicCrud extends AbstractTestUIWithLog {
protected AbstractForm form;
- protected static String[] columns = new String[] { "firstName", "lastName",
+ protected static String[] columns = { "firstName", "lastName",
"gender", "birthDate", "age", "alive", "address.streetAddress",
"address.postalCode", "address.city", "address.country" };
protected BeanItemContainer<ComplexPerson> container = ComplexPerson
import com.vaadin.v7.data.fieldgroup.BeanFieldGroup;
import com.vaadin.v7.data.fieldgroup.FieldGroup.CommitException;
-public abstract class AbstractBeanFieldGroupTest extends TestBase {
+public abstract class AbstractBeanFieldGroupTest<T> extends TestBase {
private Button commitButton;
protected Log log = new Log(5);
private Button discardButton;
private Button showBeanButton;
- private BeanFieldGroup fieldBinder;
+ private BeanFieldGroup<T> fieldBinder;
@Override
protected void setup() {
return commitButton;
}
- protected BeanFieldGroup getFieldBinder() {
+ protected BeanFieldGroup<T> getFieldBinder() {
return fieldBinder;
}
- protected void setFieldBinder(BeanFieldGroup beanFieldBinder) {
+ protected void setFieldBinder(BeanFieldGroup<T> beanFieldBinder) {
fieldBinder = beanFieldBinder;
}
import com.vaadin.v7.ui.NativeSelect;
import com.vaadin.v7.ui.TextField;
-public class FormWithNestedProperties extends AbstractBeanFieldGroupTest {
+public class FormWithNestedProperties extends AbstractBeanFieldGroupTest<Person> {
private Log log = new Log(5);
public class OrderedLayoutBasics extends TestBase {
- String valignName[] = new String[] { "top", "middle", "bottom" };
+ String valignName[] = { "top", "middle", "bottom" };
Set<AbstractOrderedLayout> layouts = new HashSet<>();
private AbstractOrderedLayout layoutContainer;
protected static final String CALENDAR_32_PNG = "../runo/icons/16/calendar.png";
protected static final String LOCK_16_PNG = "../runo/icons/16/lock.png";
protected static final String GLOBE_16_PNG = "../runo/icons/16/globe.png";
- public Alignment[] alignments = new Alignment[] { Alignment.TOP_CENTER,
+ public Alignment[] alignments = { Alignment.TOP_CENTER,
Alignment.TOP_LEFT, Alignment.TOP_RIGHT, Alignment.BOTTOM_CENTER,
Alignment.BOTTOM_LEFT, Alignment.BOTTOM_RIGHT,
Alignment.MIDDLE_CENTER, Alignment.MIDDLE_LEFT,
Alignment.MIDDLE_RIGHT };
- public final String[] CAPTIONS = new String[] { "",
+ public final String[] CAPTIONS = { "",
"VeryLongOneWordCaption",
"Very long caption of 50 approximately symbols aaaaaaaaaaaa aaaaaa aaa " };
- Resource[] ICONS = new Resource[] { new ThemeResource(CALENDAR_32_PNG),
+ Resource[] ICONS = { new ThemeResource(CALENDAR_32_PNG),
new ThemeResource(LOCK_16_PNG), new ThemeResource(GLOBE_16_PNG) };
public AbstractComponent[] components = new AbstractComponent[alignments.length];
@Override
public void itemClick(ItemClickEvent event) {
- BeanContainer<String, AbstractInMemoryContainer> metaContainer = new BeanContainer<String, AbstractInMemoryContainer>(
+ BeanContainer<String, AbstractInMemoryContainer<?, ?, ?>> metaContainer
+ = new BeanContainer<String, AbstractInMemoryContainer<?, ?, ?>>(
AbstractInMemoryContainer.class) {
@Override
public Collection<String> getContainerPropertyIds() {
@Override
protected String getDescription() {
- return "Downloading with target _new should work, aswell as with target _blank and _top.";
+ return "Downloading with target _new should work, as well as with target _blank and _top.";
}
@Override
private Layout buildButtons(boolean disabled, boolean icon, boolean error,
boolean sized) {
- String[] buttonStyles = new String[] { "Normal", "Primary", "Small",
+ String[] buttonStyles = { "Normal", "Primary", "Small",
"Link" };
HorizontalLayout hl = new HorizontalLayout();
import com.vaadin.shared.util.SharedUtil;
public class StringGenerator {
- static String[] strings = new String[] { "lorem", "ipsum", "dolor", "sit",
+ static String[] strings = { "lorem", "ipsum", "dolor", "sit",
"amet", "consectetur", "quid", "securi", "etiam", "tamquam", "eu",
"fugiat", "nulla", "pariatur" };
int stringCount = -1;
private final Action ACTION_ONE = new Action("Action One");
private final Action ACTION_TWO = new Action("Action Two");
private final Action ACTION_THREE = new Action("Action Three");
- private final Action[] ACTIONS = new Action[] { ACTION_ONE, ACTION_TWO,
+ private final Action[] ACTIONS = { ACTION_ONE, ACTION_TWO,
ACTION_THREE };
@Override
/**
* Natural property order for Person bean. Used in tables and forms.
*/
- public static final Object[] NATURAL_COL_ORDER = new Object[] { "firstName",
+ public static final Object[] NATURAL_COL_ORDER = { "firstName",
"lastName", "email", "phoneNumber", "address.streetAddress",
"address.postalCode", "address.city" };
* "Human readable" captions for properties in same order as in
* NATURAL_COL_ORDER.
*/
- public static final String[] COL_HEADERS_ENGLISH = new String[] {
+ public static final String[] COL_HEADERS_ENGLISH = {
"First name", "Last name", "Email", "Phone number",
"Street Address", "Postal Code", "City" };
public static final Object iso3166_PROPERTY_NAME = "name";
public static final Object iso3166_PROPERTY_SHORT = "short";
- private static final String[] iso3166 = new String[] { "AFGHANISTAN", "AF",
+ private static final String[] iso3166 = { "AFGHANISTAN", "AF",
"Ã…LAND ISLANDS", "AX", "ALBANIA", "AL", "ALGERIA", "DZ",
"AMERICAN SAMOA", "AS", "ANDORRA", "AD", "ANGOLA", "AO", "ANGUILLA",
"AI", "ANTARCTICA", "AQ", "ANTIGUA AND BARBUDA", "AG", "ARGENTINA",
PasswordField.class };
vl = new VerticalLayout();
hl.addComponent(vl);
- for (Class<? extends Field> fieldClass : textFields) {
+ for (Class<? extends AbstractField> fieldClass : textFields) {
vl.addComponent(getField(fieldClass));
}
* @param fieldClass
* @return
*/
- private Component getField(Class<? extends Field> fieldClass) {
- AbstractField f;
+ private Component getField(Class<? extends AbstractField> fieldClass) {
try {
- f = (AbstractField) fieldClass.newInstance();
+ AbstractField<?> f = fieldClass.newInstance();
f.setCaption(fieldClass.getSimpleName());
f.setComponentError(new UserError("fail"));
return f;
}
private void createSizeMenu() {
- String[] menupath = new String[] { "General", "Size" };
+ String[] menupath = { "General", "Size" };
addSizeMenuItem(null, "height", menupath);
addSizeMenuItem("200px", "height", menupath);
}
private void createScrollToRowMenu() {
- String[] menupath = new String[] { "Component", "State", "Scroll to...",
+ String[] menupath = { "Component", "State", "Scroll to...",
null };
for (int i = 0; i < ROWS; i += 100) {
}
private void createDetailsMenu() {
- String[] menupath = new String[] { "Component", "Row details" };
+ String[] menupath = { "Component", "Row details" };
addMenuCommand("Set generator", new ScheduledCommand() {
@Override
public void execute() {
}
}, menupath);
- String[] togglemenupath = new String[] { menupath[0], menupath[1],
+ String[] togglemenupath = { menupath[0], menupath[1],
"Toggle details for..." };
for (int i : new int[] { 0, 1, 100, 200, 300, 400, 500, 600, 700, 800,
900, 999 }) {
}
private void createSidebarMenu() {
- String[] menupath = new String[] { "Component", "Sidebar" };
+ String[] menupath = { "Component", "Sidebar" };
final List<MenuItem> customMenuItems = new ArrayList<>();
final List<MenuItemSeparator> separators = new ArrayList<>();
public GridRendererChangeWidget() {
super(new Grid<String[]>());
- String[] strArr = new String[] { "foo", "bar" };
+ String[] strArr = { "foo", "bar" };
ListDataSource<String[]> ds = new ListDataSource<String[]>(strArr);
final Grid<String[]> grid = getTestedWidget();
grid.setDataSource(ds);
private Grid grid;
- protected static String[] columns = new String[] { "firstName", "lastName",
+ protected static String[] columns = { "firstName", "lastName",
"gender", "birthDate", "age", "alive", "address.streetAddress",
"address.postalCode", "address.city", "address.country" };
addComponent(new Button("Force position update"));
}
- public void addListener(AbstractField newField) {
+ public void addListener(AbstractField<?> newField) {
AbstractTextField newTextField = (AbstractTextField) newField;
newTextField.setValueChangeMode(ValueChangeMode.EAGER);
newTextField.addValueChangeListener(event -> {
*/
private class VaadinDeveloperNameField extends TextField
implements TextChangeListener {
- private String[] names = new String[] { "Matti Tahvonen",
+ private String[] names = { "Matti Tahvonen",
"Marc Englund", "Joonas Lehtinen", "Jouni Koivuviita",
"Marko Grönroos", "Artur Signell" };
}
{
- final TextField[] tfs = new TextField[] { new TextField(),
+ final TextField[] tfs = { new TextField(),
new TextField(), new TextField(), new TextField() };
HorizontalLayout hl = new HorizontalLayout();
hl.setCaption("Blää");
// Actions for the context menu
private static final Action ACTION_ADD = new Action("Add child item");
private static final Action ACTION_DELETE = new Action("Delete");
- private static final Action[] ACTIONS = new Action[] { ACTION_ADD,
+ private static final Action[] ACTIONS = { ACTION_ADD,
ACTION_DELETE };
private Tree tree;
combobox.sendKeys(delay, Keys.ARROW_DOWN, getReturn());
waitUntilLogText("1. Item one-1 selected");
- Keys[] downDownEnter = new Keys[] { Keys.ARROW_DOWN, Keys.ARROW_DOWN,
+ Keys[] downDownEnter = { Keys.ARROW_DOWN, Keys.ARROW_DOWN,
getReturn() };
combobox.sendKeys(delay, downDownEnter);
public static Collection<Param> parameters() {
List<Param> data = new ArrayList<>();
- int[] params = new int[] { 0, 500, 999 };
+ int[] params = { 0, 500, 999 };
for (int rowIndex : params) {
return getTranslateValues(transform);
}
- double[] result = new double[] { -1, -1 };
+ double[] result = { -1, -1 };
String left = getLeftFromStyle(style);
if (left != null) {
result[0] = getPixelValue(left);
* awkward with two scroll commands back to back.
*/
private static final int ALMOST_LAST_INDEX = 995;
- private static final String[] OPEN_ALMOST_LAST_ITEM_DETAILS = new String[] {
+ private static final String[] OPEN_ALMOST_LAST_ITEM_DETAILS = {
"Component", "Details", "Open " + ALMOST_LAST_INDEX };
- private static final String[] OPEN_FIRST_ITEM_DETAILS = new String[] {
+ private static final String[] OPEN_FIRST_ITEM_DETAILS = {
"Component", "Details", "Open First" };
- private static final String[] TOGGLE_FIRST_ITEM_DETAILS = new String[] {
+ private static final String[] TOGGLE_FIRST_ITEM_DETAILS = {
"Component", "Details", "Toggle First" };
- private static final String[] DETAILS_GENERATOR_NULL = new String[] {
+ private static final String[] DETAILS_GENERATOR_NULL = {
"Component", "Details", "Generators", "NULL" };
- private static final String[] DETAILS_GENERATOR_WATCHING = new String[] {
+ private static final String[] DETAILS_GENERATOR_WATCHING = {
"Component", "Details", "Generators", "\"Watching\"" };
- private static final String[] DETAILS_GENERATOR_PERSISTING = new String[] {
+ private static final String[] DETAILS_GENERATOR_PERSISTING = {
"Component", "Details", "Generators", "Persisting" };
- private static final String[] CHANGE_HIERARCHY = new String[] { "Component",
+ private static final String[] CHANGE_HIERARCHY = { "Component",
"Details", "Generators", "- Change Component" };
@Override
.className("v-grid-editor-cancel");
protected static final org.openqa.selenium.By BY_EDITOR_SAVE = By
.className("v-grid-editor-save");
- protected static final String[] TOGGLE_EDIT_ENABLED = new String[] {
+ protected static final String[] TOGGLE_EDIT_ENABLED = {
"Component", "Editor", "Enabled" };
@Override
public class GridEditorUnbufferedTest extends GridEditorTest {
- private static final String[] TOGGLE_EDITOR_BUFFERED = new String[] {
+ private static final String[] TOGGLE_EDITOR_BUFFERED = {
"Component", "Editor", "Buffered mode" };
- private static final String[] CANCEL_EDIT = new String[] { "Component",
+ private static final String[] CANCEL_EDIT = { "Component",
"Editor", "Cancel edit" };
@Override
public class NativeSelectCaptionGenerationTest extends SingleBrowserTest {
- private static final String[] value = new String[] { "Foo", "Bar", "Baz",
+ private static final String[] value = { "Foo", "Bar", "Baz",
"Spam", "Eggs" };
@Test
openTestURL();
ComboBoxElement cb = $(ComboBoxElement.class).first();
- String[] optionsToTest = new String[] {
+ String[] optionsToTest = {
ComboBoxInputNotAllowed.ITEM_ON_FIRST_PAGE,
ComboBoxInputNotAllowed.ITEM_ON_SECOND_PAGE,
ComboBoxInputNotAllowed.ITEM_ON_LAST_PAGE,
private Integer proxyPort = null;
private JSch jsch;
private static String sshDir = System.getProperty("user.home") + "/.ssh/";
- private String[] publicKeys = new String[] {
+ private String[] publicKeys = {
System.getProperty("sshkey.file"), sshDir + "id_rsa",
sshDir + "id_dsa", sshDir + "id_rsa2" };
@Test
public void toolTipShouldBeOnTopOfMenuItem() {
- String[] themes = new String[] { ValoTheme.THEME_NAME,
+ String[] themes = { ValoTheme.THEME_NAME,
Reindeer.THEME_NAME, Runo.THEME_NAME,
ChameleonTheme.THEME_NAME };
public static Collection<Param> parameters() {
List<Param> data = new ArrayList<>();
- int[] params = new int[] { 0, 500, 999 };
+ int[] params = { 0, 500, 999 };
for (int rowIndex : params) {
public class GridDetailsClientTest extends GridBasicClientFeaturesTest {
- private static final String[] SET_GENERATOR = new String[] { "Component",
+ private static final String[] SET_GENERATOR = { "Component",
"Row details", "Set generator" };
- private static final String[] SET_FAULTY_GENERATOR = new String[] {
+ private static final String[] SET_FAULTY_GENERATOR = {
"Component", "Row details", "Set faulty generator" };
- private static final String[] SET_EMPTY_GENERATOR = new String[] {
+ private static final String[] SET_EMPTY_GENERATOR = {
"Component", "Row details", "Set empty generator" };
@Before
public class GridEditorClientTest extends GridBasicClientFeaturesTest {
- private static final String[] EDIT_ROW_100 = new String[] { "Component",
+ private static final String[] EDIT_ROW_100 = { "Component",
"Editor", "Edit row 100" };
- private static final String[] EDIT_ROW_5 = new String[] { "Component",
+ private static final String[] EDIT_ROW_5 = { "Component",
"Editor", "Edit row 5" };
@Before
@TestCategory("grid")
public class GridColumnVisibilityTest extends GridBasicFeaturesTest {
- private static final String[] TOGGLE_LISTENER = new String[] { "Component",
+ private static final String[] TOGGLE_LISTENER = { "Component",
"State", "ColumnVisibilityChangeListener" };
- private static final String[] TOGGLE_HIDE_COLUMN_0 = new String[] {
+ private static final String[] TOGGLE_HIDE_COLUMN_0 = {
"Component", "Columns", "Column 0", "Hidden" };
private static final String COLUMN_0_BECAME_HIDDEN_MSG = "Visibility "
* awkward with two scroll commands back to back.
*/
private static final int ALMOST_LAST_INDEX = 995;
- private static final String[] OPEN_ALMOST_LAST_ITEM_DETAILS = new String[] {
+ private static final String[] OPEN_ALMOST_LAST_ITEM_DETAILS = {
"Component", "Details", "Open " + ALMOST_LAST_INDEX };
- private static final String[] OPEN_FIRST_ITEM_DETAILS = new String[] {
+ private static final String[] OPEN_FIRST_ITEM_DETAILS = {
"Component", "Details", "Open firstItemId" };
- private static final String[] TOGGLE_FIRST_ITEM_DETAILS = new String[] {
+ private static final String[] TOGGLE_FIRST_ITEM_DETAILS = {
"Component", "Details", "Toggle firstItemId" };
- private static final String[] DETAILS_GENERATOR_NULL = new String[] {
+ private static final String[] DETAILS_GENERATOR_NULL = {
"Component", "Details", "Generators", "NULL" };
- private static final String[] DETAILS_GENERATOR_WATCHING = new String[] {
+ private static final String[] DETAILS_GENERATOR_WATCHING = {
"Component", "Details", "Generators", "\"Watching\"" };
- private static final String[] DETAILS_GENERATOR_PERSISTING = new String[] {
+ private static final String[] DETAILS_GENERATOR_PERSISTING = {
"Component", "Details", "Generators", "Persisting" };
- private static final String[] CHANGE_HIERARCHY = new String[] { "Component",
+ private static final String[] CHANGE_HIERARCHY = { "Component",
"Details", "Generators", "- Change Component" };
@Before
.className("v-grid-editor-cancel");
protected static final By BY_EDITOR_SAVE = By
.className("v-grid-editor-save");
- protected static final String[] EDIT_ITEM_5 = new String[] { "Component",
+ protected static final String[] EDIT_ITEM_5 = { "Component",
"Editor", "Edit item 5" };
- protected static final String[] EDIT_ITEM_100 = new String[] { "Component",
+ protected static final String[] EDIT_ITEM_100 = { "Component",
"Editor", "Edit item 100" };
- protected static final String[] TOGGLE_EDIT_ENABLED = new String[] {
+ protected static final String[] TOGGLE_EDIT_ENABLED = {
"Component", "Editor", "Enabled" };
@Before
public class GridEditorUnbufferedTest extends GridEditorTest {
- private static final String[] TOGGLE_EDITOR_BUFFERED = new String[] {
+ private static final String[] TOGGLE_EDITOR_BUFFERED = {
"Component", "Editor", "Buffered mode" };
- private static final String[] CANCEL_EDIT = new String[] { "Component",
+ private static final String[] CANCEL_EDIT = { "Component",
"Editor", "Cancel edit" };
@Override