/** * Removes all headers. Be carful about what you do! * * @see #addHeader(Object) */ public void clearHeaders() { headers.clear(); reload(); }
/** * Sets the title of this HTML page. Typically shown in the browsers window title. * * @param title The window title. */ public void setTitle(String title) { String oldVal = this.title; if ( title == null ) { title = ""; } if ( !title.equals(this.title) ) { this.title = title; reload(); } propertyChangeSupport.firePropertyChange("title", oldVal, this.title); }
@Override public void write(Device s) throws IOException { if (noCaching) { reload(); // invalidate frame on each rendering! } super.write(s); }
public void setUpdateCursor(Map<String, Object> updateCursor) { if (isDifferent(this.updateCursor, updateCursor)) { Map<String, Object> oldVal = this.updateCursor; this.updateCursor = updateCursor; reload(); propertyChangeSupport.firePropertyChange("updateCursor", oldVal, this.updateCursor); } }
public void setAutoAdjustLayout(Map<String, Object> autoAdjustLayout) { if (isDifferent(this.autoAdjustLayout, autoAdjustLayout)) { this.autoAdjustLayout = autoAdjustLayout; reload(); } }
public void setFullScreen(boolean fullScreen) { if (isDifferent(this.fullScreen, fullScreen)) { boolean oldFullScreen = this.fullScreen; this.fullScreen = fullScreen; if (fullScreen) getContentPane().setPreferredSize(SDimension.FULLAREA); reload(); propertyChangeSupport.firePropertyChange("fullScreen", oldFullScreen, this.fullScreen); } }
/** * Add an {@link Renderable} into the header of the HTML page * * @param headerElement is typically a {@link org.wings.header.Link} or {@link DynamicResource}. * @see org.wings.header.Link */ public void addHeader(Object headerElement) { if (!headers.contains(headerElement) && headerElement != null) { headers.add(headerElement); if (isUpdatePossible() && SFrame.class.isAssignableFrom(getClass())) update(((FrameCG) getCG()).getAddHeaderUpdate(this, headerElement)); else reload(); } }
public void setUpdateEnabled(boolean enabled) { if (updateEnabled != enabled) { if (isUpdatePossible() && SFrame.class.isAssignableFrom(getClass())) update(((FrameCG) getCG()).getUpdateEnabledUpdate(this, enabled)); else reload(); updateEnabled = enabled; } }
/** * @see #addHeader(Object) * @return <tt>true</tt> if this frame contained the specified header element. */ public boolean removeHeader(Object headerElement) { boolean deleted = headers.remove(headerElement); if (deleted) { if (isUpdatePossible() && SFrame.class.isAssignableFrom(getClass())) update(((FrameCG) getCG()).getRemoveHeaderUpdate(this, headerElement)); else reload(); } return deleted; }
/** * Add an {@link Renderable} into the header of the HTML page at the desired index position * * @param headerElement is typically a {@link org.wings.header.Link} or {@link DynamicResource}. * @param index index in header list to add this item * @see org.wings.header.Link * @see #getHeaders() */ public void addHeader(int index, Object headerElement) { if (!headers.contains(headerElement) && headerElement != null) { headers.add(index, headerElement); if (isUpdatePossible() && SFrame.class.isAssignableFrom(getClass())) update(((FrameCG) getCG()).getAddHeaderUpdate(this, index, headerElement)); else reload(); } }
protected boolean isEventEpochValid(LowLevelEventListener gl) { if (eventEpoch != null) { SFrame frame = ((SComponent) gl).getParentFrame(); if (frame == null) { if (log.isDebugEnabled()) { log.debug("request for dangling component '" + gl.getName() + '\''); } unregister(gl); return false; } if (!eventEpoch.equals(frame.getEventEpoch())) { if (log.isDebugEnabled()) { log.debug("### got outdated event '" + gl.getName() + "' from frame '" + frame.getName() + "' --> received epoch: " + eventEpoch + " | expected epoch: " + frame.getEventEpoch()); } frame.fireInvalidLowLevelEventListener(gl); frame.reload(); return false; } } return true; }