List of usage examples for com.google.gwt.core.client JavaScriptObject createObject
public static native JavaScriptObject createObject() ;
From source file:org.rstudio.core.client.events.EditorKeybindingsChangedEvent.java
License:Open Source License
public EditorKeybindingsChangedEvent() { bindings_ = JavaScriptObject.createObject(); }
From source file:org.rstudio.core.client.events.RStudioKeybindingsChangedEvent.java
License:Open Source License
public RStudioKeybindingsChangedEvent() { bindings_ = JavaScriptObject.createObject(); }
From source file:org.rstudio.studio.client.events.EditorCommandEvent.java
License:Open Source License
public EditorCommandEvent() { type_ = ""; data_ = JavaScriptObject.createObject(); }
From source file:org.rstudio.studio.client.workbench.addins.AddinsKeyBindingsChangedEvent.java
License:Open Source License
public AddinsKeyBindingsChangedEvent() { bindings_ = JavaScriptObject.createObject(); }
From source file:org.rstudio.studio.client.workbench.ui.MainSplitPanel.java
License:Open Source License
public void initialize(Widget left, Widget right) { left_ = left;//from w ww . j ava2s .co m right_ = right; new JSObjectStateValue(GROUP_WORKBENCH, KEY_RIGHTPANESIZE, ClientState.PERSISTENT, session_.getSessionInfo().getClientState(), false) { @Override protected void onInit(JsObject value) { State state = value == null ? null : (State) value.cast(); if (state != null && state.hasSplitterPos()) { if (state.hasPanelWidth() && state.hasWindowWidth() && state.getWindowWidth() != Window.getClientWidth()) { int delta = state.getWindowWidth() - state.getPanelWidth(); int offsetWidth = Window.getClientWidth() - delta; double pct = (double) state.getSplitterPos() / state.getPanelWidth(); addEast(right_, pct * offsetWidth); } else { addEast(right_, state.getSplitterPos()); } } else { addEast(right_, Window.getClientWidth() * 0.45); } Scheduler.get().scheduleDeferred(new ScheduledCommand() { public void execute() { enforceBoundaries(); } }); } @Override protected JsObject getValue() { State state = JavaScriptObject.createObject().cast(); state.setPanelWidth(getOffsetWidth()); state.setWindowWidth(Window.getClientWidth()); state.setSplitterPos(right_.getOffsetWidth()); return state.cast(); } @Override protected boolean hasChanged() { JsObject newValue = getValue(); if (!State.equals(lastKnownValue_, (State) newValue.cast())) { lastKnownValue_ = newValue.cast(); return true; } return false; } private State lastKnownValue_; }; add(left); setWidgetMinSize(right_, 0); }
From source file:org.rstudio.studio.client.workbench.views.source.model.DirtyState.java
License:Open Source License
public void markDirty(boolean allowUndoBackToClean) { if (!allowUndoBackToClean) cleanUndoStateToken_ = JavaScriptObject.createObject(); if (!value_) { value_ = true;//from w w w . ja v a 2 s.com fire(value_); } }
From source file:org.sigmah.offline.js.ContactCardJS.java
License:Open Source License
public static ContactCardJS toJavaScript(ContactCardDTO contactCardDTO) { ContactCardJS contactCardJS = (ContactCardJS) JavaScriptObject.createObject(); contactCardJS.setId(contactCardDTO.getId()); contactCardJS.setContactModel(contactCardDTO.getContactModel()); contactCardJS.setLayout(contactCardDTO.getLayout()); return contactCardJS; }
From source file:org.sigmah.offline.js.ContactDetailsJS.java
License:Open Source License
public static ContactDetailsJS toJavaScript(ContactDetailsDTO contactDetailsDTO) { ContactDetailsJS contactDetailsJS = (ContactDetailsJS) JavaScriptObject.createObject(); contactDetailsJS.setId(contactDetailsDTO.getId()); contactDetailsJS.setContactModel(contactDetailsDTO.getContactModel()); contactDetailsJS.setLayout(contactDetailsDTO.getLayout()); return contactDetailsJS; }
From source file:org.sigmah.offline.js.ContactHistoryJS.java
License:Open Source License
public static ContactHistoryJS toJavaScript(ContactHistory contactHistory) { ContactHistoryJS contactHistoryJS = (ContactHistoryJS) JavaScriptObject.createObject(); contactHistoryJS.setId(contactHistory.getId()); contactHistoryJS.setUserFullName(contactHistory.getUserFullName()); contactHistoryJS.setFormattedChangeType(contactHistory.getFormattedChangeType()); contactHistoryJS.setFormattedValue(contactHistory.getFormattedValue()); contactHistoryJS.setSubject(contactHistory.getSubject()); contactHistoryJS.setValueType(contactHistory.getValueType()); contactHistoryJS.setUpdatedAt(contactHistory.getUpdatedAt()); contactHistoryJS.setComment(contactHistory.getComment()); return contactHistoryJS; }
From source file:org.sigmah.offline.js.ContactModelJS.java
License:Open Source License
public static ContactModelJS toJavaScript(ContactModelDTO contactModelDTO) { ContactModelJS contactModelJS = (ContactModelJS) JavaScriptObject.createObject(); contactModelJS.setId(contactModelDTO.getId()); contactModelJS.setName(contactModelDTO.getName()); contactModelJS.setStatus(contactModelDTO.getStatus()); contactModelJS.setType(contactModelDTO.getType()); contactModelJS.setDateMaintenance(contactModelDTO.getDateMaintenance()); contactModelJS.setDetails(contactModelDTO.getDetails()); contactModelJS.setCard(contactModelDTO.getCard()); return contactModelJS; }