本文整理汇总了Java中com.extjs.gxt.ui.client.core.El类的典型用法代码示例。如果您正苦于以下问题:Java El类的具体用法?Java El怎么用?Java El使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
El类属于com.extjs.gxt.ui.client.core包,在下文中一共展示了El类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onRender
import com.extjs.gxt.ui.client.core.El; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
protected void onRender(Element target, int index) {
final El wrap = new El(DOM.createDiv());
wrap.addStyleName("x-form-field-wrap");
wrap.addStyleName("x-form-file-wrap");
setElement(wrap.dom, target, index);
createFileInput();
button = Forms.button(buttonCaption != null ? buttonCaption : "...");
button.addStyleName("x-form-file-btn");
button.setIcon(buttonIcon);
button.render(wrap.dom);
super.onRender(target, index);
super.setReadOnly(true);
}
示例2: doAutoHeight
import com.extjs.gxt.ui.client.core.El; //导入依赖的package包/类
/**
* Computes and applies the grid height depending on the number of desired elements to display.
*/
private void doAutoHeight() {
final El fileListElement = this.getView().getBody().firstChild();
final int elementsHeight;
if (visibleElementsCount <= 0 || fileListElement.firstChild() == null) {
// Shows all elements.
elementsHeight = fileListElement.getHeight();
} else {
// Shows only desired elements.
elementsHeight = fileListElement.firstChild().getHeight()
* (getStore().getCount() > visibleElementsCount ? visibleElementsCount : getStore().getCount());
}
this.setHeight((this.getView().getBody().isScrollableX() ? 20 : 0)
+ this.getView().getHeader().getHeight()
+ this.el().getFrameWidth("tb")
+ elementsHeight);
}
示例3: setIcon
import com.extjs.gxt.ui.client.core.El; //导入依赖的package包/类
public void setIcon(AbstractImagePrototype icon) {
if (rendered) {
El oldIcon = el().selectNode(style);
if (oldIcon != null) {
oldIcon.remove();
}
if (icon != null) {
Element e = icon.createElement().cast();
El.fly(e).addStyleName(style);
el().insertChild(e, 0);
}
}
this.icon = icon;
}
示例4: replaceIcon
import com.extjs.gxt.ui.client.core.El; //导入依赖的package包/类
/**
* Replaces the button icon <b>but</b> does not save icon reference into parent {@code icon} attribute.
*
* @param icon
* The button icon to display.
*/
private void replaceIcon(final AbstractImagePrototype icon) {
if (rendered) {
El oldIcon = buttonEl.selectNode("." + baseStyle + "-image");
if (oldIcon != null) {
oldIcon.remove();
el().removeStyleName(baseStyle + "-text-icon", baseStyle + "-icon", baseStyle + "-noicon");
}
el()
.addStyleName((icon != null ? (!Util.isEmptyString(html) ? " " + baseStyle + "-text-icon" : " " + baseStyle + "-icon") : " " + baseStyle + "-noicon"));
Element e = null;
if (icon != null) {
e = (Element) icon.createElement().cast();
Accessibility.setRole(e, "presentation");
fly(e).addStyleName(baseStyle + "-image");
buttonEl.insertFirst(e);
El.fly(e).makePositionable(true);
}
autoWidth();
alignIcon(e);
}
}
示例5: verifyLayout
import com.extjs.gxt.ui.client.core.El; //导入依赖的package包/类
/**
* Sets the size of the row editor to EDITOR_HEIGHT.
* Code from http://www.sencha.com/forum/showthread.php?130195-Using-RowEditor-resizing-edited-row-height-in-edit-mode
*/
@Override
protected void verifyLayout(boolean force)
{
// initialize can not be reached... but we use instead "btns !=null"
if (btns != null && (isVisible() || force))
{
Element row = (Element) grid.getView().getRow(rowIndex);
setSize(El.fly(row).getWidth(false), renderButtons ? EDITOR_HEIGHT : 0);
syncSize();
ColumnModel cm = grid.getColumnModel();
for (int i = 0, len = cm.getColumnCount(); i < len; i++)
{
if (!cm.isHidden(i))
{
Field<?> f = (Field<?>) getItem(i);
f.show();
f.getElement().setAttribute("gxt-dindex", "" + cm.getDataIndex(i));
MarginData md = (MarginData) ComponentHelper.getLayoutData(f);
f.setWidth(cm.getColumnWidth(i) - md.getMargins().left - md.getMargins().right);
}
else
{
getItem(i).hide();
}
}
layout(true);
positionButtons();
}
}
示例6: onRender
import com.extjs.gxt.ui.client.core.El; //导入依赖的package包/类
@Override
protected void onRender(Element target, int index) {
if (el() != null) {
super.onRender(target, index);
return;
}
input = new El(DOM.createInputText());
input.disable();
wrap = new El(DOM.createDiv());
wrap.dom.setClassName("x-form-field-wrap");
input.addStyleName(fieldStyle);
trigger = new El(DOM.createImg());
trigger.dom.setClassName("x-form-trigger " + triggerStyle);
trigger.dom.setPropertyString("src", GXT.BLANK_IMAGE_URL);
wrap.dom.appendChild(input.dom);
wrap.dom.appendChild(trigger.dom);
setElement(wrap.dom, target, index);
if (isHideTrigger()) {
trigger.setVisible(false);
}
super.onRender(target, index);
triggerListener = new EventListener() {
public void onBrowserEvent(Event event) {
if (!disabled) {
FieldEvent ce = new FieldEvent(AdaptableTriggerField.this);
ce.event = event;
ce.type = DOM.eventGetType(event);
ce.stopEvent();
onTriggerEvent(ce);
}
}
};
DOM.sinkEvents(wrap.dom, Event.FOCUSEVENTS);
DOM.sinkEvents(trigger.dom, Event.ONCLICK | Event.MOUSEEVENTS);
if (width == null) {
setWidth(150);
}
focusPreview = new BaseEventPreview();
new KeyNav<FieldEvent>(this) {
public void onDown(FieldEvent fe) {
AdaptableTriggerField.this.onDown(fe);
}
};
}
示例7: mask
import com.extjs.gxt.ui.client.core.El; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
public El mask(String message, String messageStyleName) {
return field.mask(message, messageStyleName);
}
示例8: getFocusEl
import com.extjs.gxt.ui.client.core.El; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
protected El getFocusEl() {
return el();
}
示例9: getInputEl
import com.extjs.gxt.ui.client.core.El; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
protected El getInputEl() {
return el();
}
示例10: getStyleEl
import com.extjs.gxt.ui.client.core.El; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
protected El getStyleEl() {
return el();
}
示例11: IterableGroupPanel
import com.extjs.gxt.ui.client.core.El; //导入依赖的package包/类
public IterableGroupPanel(final DispatchAsync dispatch, final LayoutGroupDTO layoutGroup, FlexibleElementContainer container, final boolean canEdit, final EventBus eventBus) {
super();
this.dispatch = dispatch;
this.container = container;
this.layoutGroup = layoutGroup;
this.canEdit = canEdit;
if(canEdit) {
addListener(Events.Render, new Listener<TabPanelEvent>() {
@Override
public void handleEvent(TabPanelEvent tpe) {
El strip = el().childNode(0).childNode(0).childNode(0);
int clearIdx = strip.getChildIndex(strip.lastChild().dom);
final Button button = new Button("+");
button.setEnabled(canEdit);
button.setVisible(!Profiler.INSTANCE.isOfflineMode());
button.render(strip.dom, clearIdx - 1);
ComponentHelper.doAttach(button);
button.addSelectionListener(new SelectionListener<ButtonEvent>() {
@Override
public void componentSelected(ButtonEvent ce) {
addEmptyTab(layoutGroup.getIterationType());
}
});
eventBus.addHandler(OfflineEvent.getType(), new OfflineHandler() {
@Override
public void handleEvent(OfflineEvent event) {
if (ApplicationState.OFFLINE == event.getState()) {
button.setVisible(false);
}
}
});
}
});
}
}