Skip to content
Snippets Groups Projects
Commit ad7ec88d authored by srosse's avatar srosse
Browse files

FXOLAT-358: remove clipboard service

parent 690b1b5f
No related branches found
No related tags found
No related merge requests found
Showing
with 0 additions and 203 deletions
#Sat Jan 08 13:05:53 CET 2011
ClipboardDemoController.menu.title=Clipboard
ClipboardDemoController.menu.title.alt=Demonstrates Clipboard
ErrorDemoController.menu.title=Errors
ErrorDemoController.menu.title.alt=Demonstrates Error Handling
GUIDemoCSSJSController.menu.title=Dynamic CSS & JS
......
#Thu Sep 08 16:42:39 CEST 2011
ClipboardDemoController.menu.title=\u30AF\u30EA\u30C3\u30D7\u30DC\u30FC\u30C9
ErrorDemoController.menu.title=\u30A8\u30E9\u30FC
ErrorDemoController.menu.title.alt=\u30A8\u30E9\u30FC\u51E6\u7406\u3092\u30C7\u30E2\u30F3\u30B9\u30C8\u30EC\u30FC\u30C8\u3059\u308B
GUIDemoCSSJSController.menu.title=\u30C0\u30A4\u30CA\u30DF\u30C3\u30AFCSS & JS
......
#Thu Sep 08 16:42:48 CEST 2011
ClipboardDemoController.menu.title=Clipboard
ClipboardDemoController.menu.title.alt=Demonstrates clipboard
ErrorDemoController.menu.title=Errors
ErrorDemoController.menu.title.alt=Demonstrates error handling
GUIDemoCSSJSController.menu.title=Dynamic CSS & JS
......
#Wed Jul 28 13:33:32 CEST 2010
ClipboardDemoController.menu.title=Clipboard
ClipboardDemoController.menu.title.alt=Demonstrates Clipboard
ErrorDemoController.menu.title=Errors
ErrorDemoController.menu.title.alt=Demonstrates Error Handling
GUIDemoCSSJSController.menu.title=Dynamic CSS & JS
......
#Thu Sep 08 16:42:38 CEST 2011
ClipboardDemoController.menu.title=Clipboard
ClipboardDemoController.menu.title.alt=Demonstrar Clipboard
ErrorDemoController.menu.title=Erros
ErrorDemoController.menu.title.alt=Demonstra Error Handling
GUIDemoCSSJSController.menu.title=Dynamic CSS & JS
......
#Wed Jul 28 13:33:30 CEST 2010
ClipboardDemoController.menu.title=\u526A\u8D34\u677F
ClipboardDemoController.menu.title.alt=\u663E\u793A\u526A\u8D34\u677F
ErrorDemoController.menu.title=\u9519\u8BEF
ErrorDemoController.menu.title.alt=\u663E\u793A\u9519\u8BEF\u5904\u7406
GUIDemoCSSJSController.menu.title=\u5185\u90E8 CSS & JS\u6837\u5F0F
......
#Wed Jul 28 13:33:31 CEST 2010
ClipboardDemoController.menu.title=\u526A\u8CBC\u7C3F
ClipboardDemoController.menu.title.alt=\u5C55\u793A\u526A\u8CBC\u7C3F
ErrorDemoController.menu.title=\u932F\u8AA4
ErrorDemoController.menu.title.alt=\u5C55\u793A\u932F\u8AA4\u8655\u7406
GUIDemoCSSJSController.menu.title=\u52D5\u614B CSS \u548C JS
......
#Sat Jan 08 13:05:02 CET 2011
ClipboardDemoController.menu.title.alt.annotation=deutsch nicht \u00FCbersetzt?
ErrorDemoController.menu.title.alt.annotation=tranlation?
ErrorDemoController.menu.title.annotation=no translation?
GuiDemoAjaxTreeController.menu.title.alt.annotation=no translation?
......
/**
* OLAT - Online Learning and Training<br>
* http://www.olat.org
* <p>
* Licensed under the Apache License, Version 2.0 (the "License"); <br>
* you may not use this file except in compliance with the License.<br>
* You may obtain a copy of the License at
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* Unless required by applicable law or agreed to in writing,<br>
* software distributed under the License is distributed on an "AS IS" BASIS,
* <br>
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. <br>
* See the License for the specific language governing permissions and <br>
* limitations under the License.
* <p>
* Copyright (c) since 2004 at Multimedia- & E-Learning Services (MELS),<br>
* University of Zurich, Switzerland.
* <p>
*/
package org.olat.test.guidemo.clipboard;
import org.olat.core.CoreSpringFactory;
import org.olat.core.commons.services.clipboard.ClipboardEntry;
import org.olat.core.commons.services.clipboard.ClipboardEntryCreator;
import org.olat.core.commons.services.clipboard.ClipboardService;
import org.olat.core.gui.UserRequest;
import org.olat.core.gui.components.Component;
import org.olat.core.gui.components.velocity.VelocityContainer;
import org.olat.core.gui.control.Controller;
import org.olat.core.gui.control.Event;
import org.olat.core.gui.control.WindowControl;
import org.olat.core.gui.control.controller.BasicController;
/**
* @author Felix Jost, http://www.goodsolutions.ch
*/
public class ClipboardDemoController extends BasicController {
private Controller copyToC;
private Controller pasteFromC;
private ClipboardService cps;
/**
* @param ureq
* @param wControl
*/
public ClipboardDemoController(UserRequest ureq, WindowControl wControl) {
super(ureq, wControl);
cps = (ClipboardService) CoreSpringFactory.getBean(ClipboardService.class);
// if cps == null --> service not available in this setup: does this make sense at all?
VelocityContainer mainVc = createVelocityContainer("clipdemo");
// copyTo demo
copyToC = cps.createCopyToUIService(new ClipboardEntryCreator() {
public ClipboardEntry createClipboardEntry() {
return createCurrentClipboardEntry();
}
}).createController(ureq, getWindowControl());
mainVc.put("copyto", copyToC.getInitialComponent());
// pasteFrom demo
pasteFromC = cps.createPasteFromUIService(new Class[] { DemoClipboardEntry.class}).createController(ureq, getWindowControl());
pasteFromC.addControllerListener(this);
mainVc.put("pastefrom", pasteFromC.getInitialComponent());
putInitialPanel(mainVc);
}
ClipboardEntry createCurrentClipboardEntry() {
return new DemoClipboardEntry("time:"+System.currentTimeMillis());
}
@Override
public void event(UserRequest ureq, Component source, Event event) {
// nothing to do yet
}
public void event(UserRequest ureq, Controller source, Event event) {
if (source == pasteFromC) {
ClipboardEntry cbe = cps.getClipboardEntryFrom(event);
DemoClipboardEntry dcbe = (DemoClipboardEntry) cbe;
getWindowControl().setInfo("content of clipboard is:"+dcbe.getText());
}
}
@Override
protected void doDispose() {
if (copyToC != null) copyToC.dispose();
if (pasteFromC != null) pasteFromC.dispose();
}
}
/**
* OLAT - Online Learning and Training<br>
* http://www.olat.org
* <p>
* Licensed under the Apache License, Version 2.0 (the "License"); <br>
* you may not use this file except in compliance with the License.<br>
* You may obtain a copy of the License at
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* Unless required by applicable law or agreed to in writing,<br>
* software distributed under the License is distributed on an "AS IS" BASIS, <br>
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. <br>
* See the License for the specific language governing permissions and <br>
* limitations under the License.
* <p>
* Copyright (c) since 2004 at Multimedia- & E-Learning Services (MELS),<br>
* University of Zurich, Switzerland.
* <p>
*/
package org.olat.test.guidemo.clipboard;
import org.olat.core.commons.services.clipboard.ClipboardEntry;
import org.olat.core.gui.UserRequest;
import org.olat.core.gui.control.Controller;
import org.olat.core.gui.control.WindowControl;
import org.olat.core.gui.control.creator.ControllerCreator;
import org.olat.core.gui.control.generic.messages.MessageUIFactory;
/**
* @author Felix Jost, http://www.goodsolutions.ch
*
*/
public class DemoClipboardEntry implements ClipboardEntry {
private final String text;
/**
* @param string
*/
public DemoClipboardEntry(String text) {
this.text = text;
}
/* (non-Javadoc)
* @see org.olat.core.commons.services.clipboard.ClipboardEntry#acceptsFlavor(java.lang.Class)
*/
public boolean acceptsFlavor(Class flavorInterfaceName) {
return true;
}
/* (non-Javadoc)
* @see org.olat.core.commons.services.clipboard.ClipboardEntry#createTrayUI()
*/
public ControllerCreator createTrayUI() {
return new ControllerCreator(){
public Controller createController(UserRequest ureq, WindowControl wControl) {
return MessageUIFactory.createSimpleMessage(ureq, wControl, DemoClipboardEntry.this.text);
}};
}
/**
* @return
*/
public String getText() {
return text;
}
}
copyTo:<br>
$r.render("copyto")
<hr>
pasteFrom:<br>
$r.render("pastefrom")
......@@ -461,21 +461,6 @@
<property name="order" value="25" />
</bean>
<bean class="org.olat.core.extensions.action.GenericActionExtension" init-method="initExtensionPoints">
<property name="actionController">
<bean class="org.olat.core.gui.control.creator.AutoCreator" scope="prototype">
<property name="className" value="org.olat.test.guidemo.clipboard.ClipboardDemoController"/>
</bean>
</property>
<property name="translationPackage" value="org.olat.test.guidemo" />
<property name="extensionPoints">
<list>
<value>org.olat.test.GUIDemoMainController</value>
</list>
</property>
<property name="order" value="26" />
</bean>
<bean class="org.olat.core.extensions.action.GenericActionExtension" init-method="initExtensionPoints">
<property name="actionController">
<bean class="org.olat.core.gui.control.creator.AutoCreator" scope="prototype">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment