Functionality of JFormattedTextField and JComboBox in one control
Hi,
I am developing a component which shall switch from JFormattedField to JComboBox as per requirements. For example, If a single value is used then the component acts like a JFormattedTextField and if array of values is used then the component acts like a JComboBox.
One way of doing this is to create a new class sub-classing JComponent, create both the above mentioned objects and then implement all the methods (inherited as well as sum of methods/properties of both the components) by forwarding the call to the JFormattedTextField or JCombobox or both.
Can somebody suggest a better design.
Thanks in advance! Good day!
RKON
almost2good wrote:
How can I make Lion show a space number on the top of the screen so I can see which space I am in?
Currently you cannot.
almost2good wrote:
How can I make Lion switch spaces in a ring? ie? 1, 2, 3, 4, 5, 6, 1, 2, 3, ...
You cannot organise Mission Control's "Desktops" this way. They are organised in a single row to allow the swipe gestures to work. Apple allows no way to customise this.
almost2good wrote:
How can I make lion switch directly to a numbered space? ie: 1, 4, 5, 2, etc...
By deafult you should be able toi switch by pressing ctrl plus the desktop number, e.g. ctrl+1. This is the same as Spaces in Snow Leopard. You can customise this under System Preferences (Keyboard > Keyboard Shortcuts > Mission Control).
almost2good wrote:
Without these three capabilities Mission Control is a giant step backward....I am disappointed in the way it works and would liketo know how to disable it and give me back the way spaces used to work.
A lot of people are disapointed with Mission Control. In my opinion it's a step backwards from Spaces & Expose in Snow Leopard but peoples views on this will depend if they used Spaces & Expose in Leopard/Snow Leopard and the type of Mac they are using - it makes some sense on a Macbook Air, for example, with a small screen and multi-touch trackpad but not so much on an iMac or Mac Pro (sames goes for Launchpad). I just hope Apple listens to the criticism and enables customisation options to change the way Mission Control behaves.
Similar Messages
-
How use JLabel and JCombobox on one string
package ReplacementCode;
import java.awt.BorderLayout;
import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;
import javax.swing.Box;
import javax.swing.BoxLayout;
import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTextArea;
class MainFrame extends JFrame {
private static JTextArea text = new JTextArea(ReadingFromFile.textFromFile.size(), 40);
private static JScrollPane forText = new JScrollPane(text);
private static JPanel westPanel = new JPanel();
private static JPanel forAlphabet = new JPanel();
private static JPanel forModifyChars = new JPanel();
private static JLabel[] labels = new JLabel[Alphabet.russianAlphabet.length()];
private static Object[] massiveOfAlphabet = new Object[Alphabet.russianAlphabet.length()];
private static JComboBox[] comboBoxes = new JComboBox[Alphabet.russianAlphabet.length()];
private static JButton startButton = new JButton("!заменить!");
private static BoxListener[] boxListeners = new BoxListener[Alphabet.russianAlphabet.length()];
public MainFrame() {
super("оснвовное окно");
setDefaultCloseOperation(EXIT_ON_CLOSE);
initiasizeCenter();
initiasizeWest();
JLabel jlab = new JLabel(Alphabet.russianAlphabet.toUpperCase());
jlab.setOpaque(true);
add(forText, BorderLayout.CENTER);
add(westPanel, BorderLayout.WEST);
add(startButton, BorderLayout.SOUTH);
add(jlab, BorderLayout.NORTH);
setSize(this.getMaximumSize());
setVisible(true);
private void initiasizeWest() {
putAlphabet();
forModifyChars.setLayout(new BoxLayout(forModifyChars, BoxLayout.Y_AXIS));
forAlphabet.setLayout(new BoxLayout(forAlphabet, BoxLayout.Y_AXIS));
for(int ii = 0; ii < Alphabet.russianAlphabet.length(); ii++) {
comboBoxes[ii] = new JComboBox(massiveOfAlphabet);
comboBoxes[ii].setSelectedIndex(ii);
boxListeners[ii] = new BoxListener();
comboBoxes[ii].addKeyListener(boxListeners[ii]);
forModifyChars.add(comboBoxes[ii]);
StringBuffer sb = new StringBuffer();
sb.append(Alphabet.russianAlphabet.charAt(ii));
labels[ii] = new JLabel(sb.toString().toUpperCase());
labels[ii].setOpaque(true);
labels[ii].setHorizontalTextPosition(JLabel.LEFT);
labels[ii].setVerticalTextPosition(JLabel.CENTER);
westPanel.add(forAlphabet);
westPanel.add(Box.createHorizontalGlue());
westPanel.add(forModifyChars);
private static void initiasizeCenter() {
text.setLineWrap(true);
for(int ii = 0; ii < ReadingFromFile.textFromFile.size(); ii++)
text.append(ReadingFromFile.textFromFile.elementAt(ii) + "\n");
private static void initiasizeSouth() {}
private static void initiasizeNorth() {}
private static final void putAlphabet() {
for(int ii = 0; ii < Alphabet.russianAlphabet.length(); ii++)
massiveOfAlphabet[ii] = Alphabet.russianAlphabet.charAt(ii);
private class BoxListener implements KeyListener {
public BoxListener() {
public void keyPressed(KeyEvent e) {
System.out.println("слушаетль нажатия клавиши : " + e + "\n");
public void keyReleased(KeyEvent e) {
System.out.println("слушаетль отпускания клавиши : " + e + "\n");
public void keyTyped(KeyEvent e) {
System.out.println("слушаетль печатания символа : " + e + "\n");
package ReplacementCode;
import java.util.Vector;
abstract class Alphabet {
final static String russianAlphabet = new String("абвгдеёжзийклмнопрстуфхцчшщъыьэюя");
private static String replacementAlphabet;
private static double[] ratesOfCharacters = new double[russianAlphabet.length()];
static Vector<String> replacementedText = new Vector<String>();
static final void generateAlphabetOfReplacement() {
boolean[] occupancy = new boolean[russianAlphabet.length()];
for(int ii = 0; ii < occupancy.length; ii++)
occupancy[ii] = false;
char[] ancillaryMassiveOfCharacters = new char[russianAlphabet.length()];
for(int ii = 0; ii < ancillaryMassiveOfCharacters.length; ii++) {
for(;;) {
int ancillaryPositionOfCharacter = (int) (Math.random() * ancillaryMassiveOfCharacters.length);
if(occupancy[ancillaryPositionOfCharacter] == false) {
occupancy[ancillaryPositionOfCharacter] = true;
ancillaryMassiveOfCharacters[ii] = russianAlphabet.charAt(ancillaryPositionOfCharacter);
break;
replacementAlphabet = new String(ancillaryMassiveOfCharacters);
static final void workWithText(Vector<String> unreplacementText) {
generateAlphabetOfReplacement();
nullingOfRates();
replacementedText.removeAllElements();
for(int ii = 0; ii < unreplacementText.size(); ii++) {
char[] occupancyMassive = unreplacementText.elementAt(ii).toCharArray();
for(int jj = 0; jj < occupancyMassive.length; jj++) {
//verification of agreement of character's in text with basic alphabet
for(int kk = 0; kk < russianAlphabet.length(); kk++) {
if(Character.isUpperCase(unreplacementText.elementAt(ii).charAt(jj)) &&
occupancyMassive[jj] == Character.toUpperCase(russianAlphabet.charAt(kk))) {
occupancyMassive[jj] = Character.toUpperCase(replacementAlphabet.charAt(kk));
ratesOfCharacters[kk]++;
break;
if(Character.isLowerCase(unreplacementText.elementAt(ii).charAt(jj)) &&
occupancyMassive[jj] == russianAlphabet.charAt(kk)) {
occupancyMassive[jj] = replacementAlphabet.charAt(kk);
ratesOfCharacters[kk]++;
break;
//save new replacemented text
replacementedText.add(new String(occupancyMassive));
// System.out.println(unreplacementText.elementAt(ii));
// System.out.println(replacementedText.elementAt(ii));
static final void workWithText(Vector<String> unreplacementText, String oldAlphabet, String newAlphabet) {
nullingOfRates();
replacementedText.removeAllElements();
for(int ii = 0; ii < unreplacementText.size(); ii++) {
char[] occupancyMassive = unreplacementText.elementAt(ii).toCharArray();
for(int jj = 0; jj < occupancyMassive.length; jj++) {
//verification of agreement of character's in text with basic alphabet
for(int kk = 0; kk < oldAlphabet.length(); kk++) {
if(Character.isUpperCase(unreplacementText.elementAt(ii).charAt(jj)) &&
occupancyMassive[jj] == Character.toUpperCase(oldAlphabet.charAt(kk))) {
occupancyMassive[jj] = Character.toUpperCase(newAlphabet.charAt(kk));
ratesOfCharacters[kk]++;
break;
if(Character.isLowerCase(unreplacementText.elementAt(ii).charAt(jj)) &&
occupancyMassive[jj] == oldAlphabet.charAt(kk)) {
occupancyMassive[jj] = newAlphabet.charAt(kk);
ratesOfCharacters[kk]++;
break;
//save new replacemented text
replacementedText.add(new String(occupancyMassive));
// System.out.println(unreplacementText.elementAt(ii));
// System.out.println(replacementedText.elementAt(ii));
private static void nullingOfRates() {
for(int ii = 0; ii < ratesOfCharacters.length; ii++)
ratesOfCharacters[ii] = 0;
}the problem is in westPanel; how we can typed text from the Jlabel near JCombobox
now - text from combobox we can see, and text from label - don't.
and one of condition is don't crash massive of JCombobox and Jlabel
please help meif if was different mod then only create many vertical Jpanels, with pair jlabel, jcombobox, please write...i don't want to do this because it wil bee many references on Jpanels-> many memory..
-
NI DAQ and Arduino in Matlab (control obj in a callback function triggered by another obj)
(I am aware that this may not be the most appropriate place to ask, but I'm pretty desperate...)
I am writing a script to acquire online data from a DAQ card and to control an Arduino microcontroller based on the output of the DAQ card data.
The acquiring of the DAQ card data works fine, but I'm having problems with (1) the online processing of these data and (2) the corresponding controlling of the Arduino microcontroller. I'll try to explain both problems as clear as possible, the matlab code that has already been written can be found at the bottom of this question.
I'm using a 64-bit Matlab, so I can only use the Session-Based Interface.
1) Online processing
Data are collected at a rate of 1000 samples/s. Each time 250 new samples are available, a callback function is triggered to process these data (using a listener triggered by the 'DataAvailable' event). This processing consists of spectral analysis, using the 'spectrogram' function. The problem is that the spectrogram function should use a window of 500 samples and an overlap of 250 samples. So, new samples should be available for processing every 250 samples, but not only the new 250 samples but also the previous 250 samples are needed to accomplish the overlap. Basically, I need 500 samples for each callback function run, but this function has to be ran every 250 samples.
2) Controlling the Arduino
The biggest problem lies in the controlling of the Arduino. After spectral analysis, the calculated value is compared to a predefined treshold and if this value exceeds the treshold, the output of the Arduino should be put to one, else the output should be put to zero. The problem here is that, since the callback function is an external function, it doesn't recognize the Arduino object. The Arduino has been connected to Matlab at the start of the script, but is only available in the 'base' workspace. Connecting the Arduino on each function run isn't a possibility, since this should be done every 250 ms.
Attempted solutions
I have tried to make the function into a nested function, so that it can use the same variables as the ones in the script, but Matlab doesn't allow this. When I write a nested function, I get the following error: "A nested function cannot be defined inside a control statement (if, while, for, switch or try/catch)." However, I have never defined one of these statements, so the function isn't inside a control statement. I don't understand why this doesn't work.
Matlab code
Script
%% Preparing Arduino
% Connecting the arduino chip to Matlab
a=arduino('COM4');
% Defining the 13th pin as an output
a.pinMode(13,'output')
%% Preparing the DAQ card
% Searching the DAQ card
devices = daq.getDevices;
% Create a session
s = daq.createSession('ni');
% Define the input channel
s.addAnalogInputChannel('Dev1', 0, 'Voltage');
% Define the total measuring and stimulation time
s.DurationInSeconds = 4;
% Define the interval for processing
s.NotifyWhenDataAvailableExceeds = 500;
% Loading the optimal stimulation parameters
load('parameters.mat')
setappdata(s,'freq',parameters(1))
setappdata(s,'treshold',parameters(2))
% Define a listener triggered by the DataAvailable event
lh = s.addlistener('DataAvailable',@stimulation);
% Save the start time
starttime=clock;
% Start the measurements
LFP=s.startForeground;
Callback function
function stimulation(src,event)
freq=getappdata(src,'freq');
treshold=getappdata(src,'treshold');
LFP=event.Data;
[S,F,T,P]=spectrogram(LFP,500,250,[],1000);
PSD=log(P(freq));
if PSD>=treshold
a.digitalWrite(13,1)
else
a.digitalWrite(13,0)
end
end
All comments/suggestions are welcome.
Many thanks in advance!Hello hemm,
As you noted this is most likely not the appropriate place to past these non-NI Development environment related questions.
Especially since the issue does not seem to be related to the interface with the NI DAQ card.
Maybe you could add some Message Tags so that people that are following specific tags might be able to detect your question and help you.
Would it be an option for you to use NI LabVIEW?
If this is the case then it might be interesting to note that many of the Arduino users over here are using the NI LabVIEW Interface for Arduino Toolkit:
http://sine.ni.com/nips/cds/view/p/lang/en/nid/212478
This is however being supported from the following page:
https://decibel.ni.com/content/groups/labview-interface-for-arduino
Kind Regards,
Thierry C - Applications Engineering Specialist Northern European Region - National Instruments
CLD, CTA
If someone helped you, let them know. Mark as solved and/or give a kudo. -
I have a MacBook, made in 2010. I can't get the eject function to work. I have a DVD in now and want to eject it and put another one in. Command-E, dragging it to the trash or Find-Eject does not work. Ideas?
Hi there. Hear are some other options . Hold down for click on the track pad while restarting and keep it down all the way thru boot. Or use right click on a mouse. If it's stuck, sometimes sticking a business card in top edge of slot while trying the eject option can work.
-
Control multiple updates and queries within one transaction in JPA
Hi,
I have a question regarding control multiple updates and queries within one transaction. We are using EclipseLink 2.3.1. With below code, will I be able to:
- have all insert, update, select queries committed in one transaction;
- queryGetBalance will return the latest OrgBalance after update;
- if one fails, everything rolls back.
Thanks!
Jeffrey
PS: I realized that I cannot use em.getTransaction().begin() and em.getTransaction().commit(), since I am using JTA.
=============
@PersistenceContext(unitName="Test")
EntityManager em;
em.setFlushMode(FlushModeType.COMMIT);
newTransaction.setAmount(1000);
newTransaction.setType("check");
em.persist(newTransaction);
orgAudit.setUpdateUser("Joe")
orgAudit.setupUpdateTime(time);
em.merge(orgAudit);
Query queryUpdateBalance = em.createQuery("update OrgBalance o set o.balance = o.balance + :amount where orgId = :myOrgId");
queryUpdateBalance.setParameter("amount", 1000);
queryUpdateBalance.setParameter("myOrgId", 1234);
Query queryGetBalance = em.createQuery("select OrgBalance o where o.orgId = :myOrgId");
queryGetBalance.setHint("javax.persistence.cache.storeMode", CacheStoreMode.REFRESH);
queryGetBalance.setHint("javax.persistence.cache.retrieveMode", CacheRetrieveMode.BYPASS);
queryGetBalance.getResultList();
em.flush();
Edited by: JeffreyW on Dec 12, 2011 10:34 AMYes, the operation will be in a single transaction, assuming you are using a JTA managed SessionBean and the code is part of a SessionBean method.
-
After upgrading to the latest ios my imessage and facetime apps do not function.....any one having similar difficulties?
Start your '''Computer''' in safe mode. Then start Firefox. Try '''Safe''' web sites.
Starting The Computer In Safe Mode;
If running, turn your computer off.
Remove any disks and thumb drives that are in your hard drives or ports.
Now start your computer but also;
'''Windows; '''Press the <F8> key repeatedly.
'''Mac: '''Hold down the Shift key.
'''Linux; '''Using the command line, Linux/Unix computers can be booted
into various run levels that determine which resources are loaded.
For example, "runlevel 1" is typically the equivalent to Windows and
Mac safe modes.
* Source; '''[http://encyclopedia2.thefreedictionary.com/Linux+Safe+Mode Safe Mode; Free Online Encyclopedia]'''
When the '''Boot''' menu is displayed, release the key you were pressing.
You must now choose what mode to use. The most used are;
* Safe Mode; The computer runs with only a minimum set of programs.
* Safe Mode '''With '''Networking; Same as above, but with internet access. -
I just set an administrators name (my full name) and password for parental controls (using the one I always use) and now after restarting and trying to make changes to aprental controls it does not recognize my password
Hello, do you have another admin account to log into for a test?
-
JList and Textfield together as one control
Hi
I want to create a control where i have a drop down list and also a textfield beside the list so that it appears as one control.The dropdown list should be visible only while typing and after selecting text from list i should be able to add some more text to it.How do i do itI think u should select the component from Jlist which u want to change and set it to JtextField and change what ever u want and add that component back to the Jlist or overrride in the same place.
Thanks. -
Whats the functional difference between dbconole and using the Grid control.
I know this may seem like a strange question, but I was wondering if I only have one instance on my server, would benefit would i gain if I installed and configured the grid control
over the dbconsole that comes with the 11gr2?
I know the Grid control can discover many databases, but what else can it do that the dbconsole cannot?
thanks!Hi,
Indeed good question.
It depends on installation type you selected. But are responsible for user administration in terms of creating, deleting, updating and role assignment tasks to users and groups.
--CUA is meant for ABAP Installation. CUA is responsible for entire landscape user administration works with RFC connection talking to all ABAP systems
--UME is meant for Java installations, plus UME is responsible for handling communication between ABAP users and java users.
UME
For more details see below links all advantages and disadvantages of both systems and comparisons deliberately.
http://help.sap.com/saphelp_nw2004s/helpdata/en/d2/3e3842b23d690de10000000a155106/frameset.htm
Thanks,
Amit Lal
P.S Please don't forget to reward pts. -
How do I copy the style from one control to another?
I need to programmatically copy the style from one graph to another. I'm currently using the importstyle and export style functions but I'd like to avoid that since: 1) I'm creating >100 of the same graphs in a scrolling window and execution time is a concern, and 2) it makes it harder to redistribute the application, and 3) you shouldn't have to import/export from disk just to copy a graph style.
I noticed the copy constructor was disabled so you can't just create a new one from the original. I suppose I could iterate through all the styles and transfer them from the master graph to all the copies but is there an easier way to do that? If not, is there some sample code for that?
I'm using MStudio 7.0 for C
++.
Thanks,
-BobOne way that you could do this would be to create a helper method that configures your graph rather than configuring it at design-time, then use that helper method to apply the settings to the new graphs that you create. However, this would only work if you wanted all graphs to be configured exactly the same way - this would not work if the settings of your master graph are changing at run-time and you want the new graphs to be configured with the current settings of the master graph.
Another approach is to query each control for IPersistPropertyBag, create an IPropertyBag, pass the IPropertyBag to the master graph's IPersistPropertyBag:ave, then pass the IPropertyBag to the new graph's IPersistPropertyBag::Load implementation. I'm not aware of any implementations of IPropertyBag that are readily available for use in applications, so the tricky part is creating the IPropertyBag. Below is a very simple implementation of IPropertyBag that should be enough to get the job done for this example. First, add this to your stdafx.h:
#include <atlbase.h>
CComModule _Module;
#include <atlcom.h>
#include <atlcoll.h>
Here's the simple IPropertyBag implementation:
class ATL_NO_VTABLE CSimplePropertyBag :
public CComObjectRootEx<CComSingleThreadModel>,
public IPropertyBag
private:
CAtlMap<CComBSTR, CComVariant> m_propertyMap;
public:
BEGIN_COM_MAP(CSimplePropertyBag)
COM_INTERFACE_ENTRY(IPropertyBag)
END_COM_MAP()
STDMETHODIMP Read(LPCOLESTR pszPropName, VARIANT* pVar, IErrorLog* pErrorLog)
HRESULT hr = E_FAIL;
if ((pszPropName == NULL) || (pVar == NULL))
hr = E_POINTER;
else
if (SUCCEEDED(::VariantClear(pVar)))
CComBSTR key = pszPropName;
CComVariant value;
if (!m_propertyMap.Lookup(key, value))
hr = E_INVALIDARG;
else
if (SUCCEEDED(::VariantCopy(pVar, &value)))
hr = S_OK;
return hr;
STDMETHODIMP Write(LPCOLESTR pszPropName, VARIANT* pVar)
HRESULT hr = E_FAIL;
if ((pszPropName == NULL) || (pVar == NULL))
hr = E_POINTER;
else
m_propertyMap.SetAt(pszPropName, *pVar);
hr = S_OK;
return hr;
Once you have a way to create an implementation of IPropertyBag, you can use IPropertyBag and IPersistPropertyBag to copy the settings from one control to another like this:
void CopyGraphStyle(CNiGraph& source, CNiGraph& target)
LPUNKNOWN pSourceUnknown = source.GetControlUnknown();
LPUNKNOWN pTargetUnknown = target.GetControlUnknown();
if ((pSourceUnknown != NULL) && (pTargetUnknown != NULL))
CComQIPtr<IPersistPropertyBag> pSourcePersist(pSourceUnknown);
CComQIPtr<IPersistPropertyBag> pTargetPersist(pTargetUnknown);
if ((pSourcePersist != NULL) && (pTargetPersist != NULL))
CComObject<CSimplePropertyBag>* pPropertyBag = 0;
CComObject<CSimplePropertyBag>::CreateInstance(&pPropertyBag);
if (pPropertyBag != NULL)
CComQIPtr<IPropertyBag> spPropertyBag(pPropertyBag);
if (spPropertyBag != NULL)
if (SUCCEEDED(pSourcePersist->Save(spPropertyBag, FALSE, TRUE)))
pTargetPersist->Load(spPropertyBag, NULL);
(Note that "CreateInstan ce" above should be CreateInstance - a space gets added for some unknown reason after I click Submit.)
Then you can use this CopyGraphStyle method to copy the settings of the master graph to the new graph. Hope this helps.
- Elton -
Issue : drag and drop from list control to tree control
Hi,
I was trying a drag and drop from list control to tree control. I have used some sample data to populate list and tree controls .
It is working fine . except one problem ..
Prob : when i drag an item to tree control .. it gets added .. now tree contains (X+1) data in list .. say X is the inital number of nodes in a tree node.
now if i drag another item from list to last item in the tree node .. i.e at X+1 index. .. it throws null pointer exception.
I am considerably new in flex programming . looking for help from experts ..
Below is my code :
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="horizontal"
creationComplete="init()">
<mx:Script>
<![CDATA[
import mx.controls.listClasses.IListItemRenderer;
import mx.rpc.events.FaultEvent;
import mx.rpc.events.ResultEvent;
import mx.utils.ObjectUtil;
import mx.collections.ICollectionView;
import mx.core.UIComponent;
import mx.managers.DragManager;
import mx.events.DragEvent;
import mx.controls.Alert;
import mx.controls.Label;
import mx.events.CloseEvent;
private var homePath:String="/home/e311394/dndTest/";
private var destPath:String="/home/e311394/dndDest/";
private var eid:String="e311394";
private var actn:String;
[Bindable]
private var cm:ContextMenu;
private var cmi:ContextMenuItem;
[Bindable]
private var dp:ArrayCollection;
private function init():void
cmi=new ContextMenuItem("Remove");
cmi.enabled=true;
cmi.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, contextMenuItem_menuItemSelect);
cm=new ContextMenu();
cm.hideBuiltInItems();
cm.customItems=[cmi];
cm.addEventListener(ContextMenuEvent.MENU_SELECT, contextMenuItem_menuSelect);
list.contextMenu=cm;
private function contextMenuItem_menuSelect(evt:ContextMenuEvent):void
list.selectedIndex=lastRollOverIndex;
private function contextMenuItem_menuItemSelect(evt:ContextMenuEvent):void
var loclSelectedRow:Object=list.selectedItem;
var lostrSelectedMenuItem:String;
lostrSelectedMenuItem=evt.target.caption;
if (loclSelectedRow != null)
var obj:Object=new Object()
obj.label=loclSelectedRow.label as String;
//Alert.show(obj.label);
if (lostrSelectedMenuItem == "Remove")
if(loclSelectedRow!=null)
var pth:String=homePath.concat(loclSelectedRow.label);
//Alert.show(pth);
//FlexDnDRemoteService.process(eid,"delete",pth,"-");
var coll:ArrayCollection=list.dataProvider as ArrayCollection;
if (coll.contains(loclSelectedRow))
coll.removeItemAt(coll.getItemIndex(loclSelectedRow));
public function onTreeDragEnter(event:DragEvent):void
event.preventDefault();
DragManager.acceptDragDrop(event.target as UIComponent);
tree.showDropFeedback(event);
protected function onTreeDragOver(event:DragEvent):void
event.preventDefault();
event.currentTarget.hideDropFeedback(event);
try
var index:int=tree.calculateDropIndex(event);
catch (e:Error)
DragManager.showFeedback(DragManager.NONE);
return;
tree.selectedIndex=index;
var draggedOverItem:Object=tree.selectedItem;
public function onTreeDragExit(event:DragEvent):void
event.preventDefault();
tree.hideDropFeedback(event);
private function showAlert():void
Alert.yesLabel="Move";
Alert.noLabel="Copy";
Alert.buttonWidth=70;
Alert.show("Copy / Move ?", "Confirm", Alert.YES | Alert.NO | Alert.CANCEL, this, alertListener, null, Alert.OK);
private function alertListener(eventObj:CloseEvent):void
var result:Boolean=false;
if (eventObj.detail == Alert.CANCEL)
//Alert.show("CANCEL");
return;
if (eventObj.detail == Alert.YES)
//Alert.show("YES");
result=true;
else if (eventObj.detail == Alert.NO)
//Alert.show("NO");
result=false;
var index:int=tree.calculateDropIndex(treedropevt);
//Alert.show("Drop Pos" + index.toString());
/* var treeList:ArrayCollection=tree.dataProvider as ArrayCollection;
Alert.show(" index"+index+"Length "+treeList.length);
if(index > treeList.length)
Alert.show("Returning");
return;
var items:Array=new Array();
if (treedropevt.dragSource.hasFormat("items"))
items=items.concat(treedropevt.dragSource.dataForFormat("items") as Array);
var parentItem:Object;
parentItem=getObjectTarget();
/* if (tree.dataDescriptor.isBranch(tree.indexToItemRenderer(index).data))
parentItem=tree.indexToItemRenderer(index).data;
else
var dropParentPackage:Object = tree.mx_internal::_dropData.parent as Object;
Alert.show("HAck"+dropParentPackage.toString());
parentItem=tree.getParentItem(tree.indexToItemRenderer(index).data);
//Alert.show("Lenght "+ObjectUtil.getClassInfo(parentItem).properties.length);
//Alert.show("Lenght "+ObjectUtil.getClassInfo(parentItem).properties.length);
var position:int=0;
/* if(ObjectUtil.getClassInfo(parentItem).properties.length==0)
Alert.show("Returning");
return;
if (parentItem != null)
try
while (tree.indexToItemRenderer(index).data != parentItem)
//Alert.show(tree.indexToItemRenderer(index).data.toString());
if (index > 0)
index--;
//Alert.show("Insiade");
position++;
catch (e:Error)
Alert.show("Catch" + index.toString());
return;
for each (var item:Object in items)
var obj:Object=new Object()
obj.label=item.label as String;
if (parentItem != null)
//Alert.show("ADDED");
tree.dataDescriptor.addChildAt(parentItem, obj, position++);
else
//Alert.show("PARENT NULL");
tree.dataDescriptor.addChildAt(tree.selectedItem, obj, position++);
var spth:String=homePath.concat(item.label);
//Alert.show(spth);
var dpth:String=destPath.concat(item.label);
//Alert.show(dpth);
if (result == true)
removeItems();
//FlexDnDRemoteService.process(eid,"move",spth,dpth);
else
//FlexDnDRemoteService.process(eid,"copy",spth,dpth);
tree.validateNow();
public function getObjectTarget():Object
var dropData:Object=tree.mx_internal::_dropData as Object;
if (dropData.parent != null)
return dropData.parent;
else
// if there is not parent (root of the tree), I take the root directly
var renderer:IListItemRenderer=tree.indexToItemRenderer(0);
return renderer.data;
public function removeItems():void
//remove moved elements
var items:Array=treedropevt.dragSource.dataForFormat("items") as Array;
var coll:ArrayCollection=list.dataProvider as ArrayCollection;
for each (var item:Object in items)
if (coll.contains(item))
coll.removeItemAt(coll.getItemIndex(item));
private var treedropevt:DragEvent;
public function onTreeDragDrop(event:DragEvent):void
treedropevt=event;
showAlert();
event.preventDefault();
tree.hideDropFeedback(event);
public function resultHandler(event:ResultEvent):void
Alert.show("Success", "Status");
public function faultHandler(event:FaultEvent):void
Alert.show(event.fault.faultString, "Failure");
]]>
</mx:Script>
<mx:ArrayCollection id="listDP">
<mx:Object label="File1.dnd"/>
<mx:Object label="File2.dnd"/>
<mx:Object label="File3.dnd"/>
<mx:Object label="File4.dnd"/>
<mx:Object label="File5.dnd"/>
</mx:ArrayCollection>
<mx:Number id="lastRollOverIndex"/>
<!--
<mx:ArrayCollection id="treeDP">
<mx:Object label="/home">
<mx:children>
<mx:Object label="dummy1.ks"/>
<mx:Object label="dummy2.ks"/>
<mx:Object label="e493126">
<mx:children>
<mx:ArrayCollection>
<mx:Object label="/home/e493126/sample1.ks"/>
</mx:ArrayCollection>
</mx:children>
</mx:Object>
</mx:children>
</mx:Object>
</mx:ArrayCollection>
-->
<mx:ArrayCollection id="treeDP">
<mx:Object label="/dndDest">
<mx:children>
<mx:ArrayCollection>
<mx:Object label="sample1.ks"/>
<mx:Object label="sample2.ks"/>
<mx:Object label="sample3.ks"/>
<mx:Object label="sample4.ks"/>
<mx:Object label="sample5.ks"/>
<mx:Object label="sample6.ks"/>
</mx:ArrayCollection>
</mx:children>
</mx:Object>
</mx:ArrayCollection>
<mx:List id="list"
itemRollOver="lastRollOverIndex = event.rowIndex"
width="50%"
dragEnabled="true"
dataProvider="{listDP}"
labelField="label"
allowMultipleSelection="true"
dragMoveEnabled="false">
</mx:List>
<mx:Tree id="tree"
width="50%"
dragEnabled="true"
dataProvider="{treeDP}"
dragEnter="onTreeDragEnter(event)"
dragOver="onTreeDragOver(event)"
dragExit="onTreeDragExit(event)"
dragDrop="onTreeDragDrop(event)"
labelField="label"
liveScrolling="true">
</mx:Tree>
<mx:RemoteObject id="FlexDnDRemoteService"
showBusyCursor="true"
destination="FlexDnD">
<mx:method name="process"
result="resultHandler(event)"
fault="faultHandler(event)"/>
</mx:RemoteObject>
</mx:Application>
Thanks,
RajivYa , i have searched and have used the same code.
But needed to customize few things like:
stop dnd in same tree
drop some item into a folder ..( onto it ) etc
have achieved the same .. but this issue ..
i think the tree dataprovider (contents internally is not being updated .. only the UI)
any suggestions ?
- Rajiv -
DIFFERENCE BETWEEN TALLY ERP AND SAP BUSINESS ONE
Hello Experts,
From where i can find the comparison between TAlly ERP and SAP business one ?Tally 9.0
Accounting
. To fulfill legal requirements - records as per standards and practices
. To pay taxes to various bodies - statutory needs
. Keep the business running - manage receivables & payables, cash, bank...
. Keep a watch on the pulse of the organisation - key performance indicators
. Respond to queries - to locate the right transaction immediately
. With the entry of a voucher (this is what we call all accounting transactions) all books of accounts, all reports, all totals & sub-totals are updated instantly. There is nothing more that needs to be done - whether you are inserting a forgotten entry, or correcting one.
. Taxation requirements of all the states of India are available, in the prescribed formats.
. Supporting tasks like reminder letters, delayed interest, ageing, bank reconciliation.
. One single dashboard to look at all important business ratios.
. Drill down from any report, even the Balance Sheet, right to any voucher or filter and search.
. Data entry in the language of the users choice - and report in any other language (from the languages supported).
. Mark vouchers that are draft as 'optional' and convert these to final- with one button click
Financial Management & Controls
Tally.ERP 9 comes with rich features & financial reports that give you the necessary management and control of your business. A few of these are listed below:
u2022 Funds Flow & Cash Flow reports - help you locate bottlenecks
u2022 Bank reconciliation - keeps your bank books in sync, and identify unclear instruments
u2022 Customer Credit Limits - to limit risk of default and large losses
u2022 Budgets - keep tabs on projected expenses against actuals
u2022 Mark vouchers post dated - these will reflect into the books of accounts only on/after that date
u2022 For needs where reports have to consider a transaction that has not happened (say salaries for this month that get paid the next month) vouchers (called 'reversing journals') can be marked to 'disappear' for reports post a specific date
u2022 "Scenario" management - helps you with your business forecasting and planning. You can use optional, reversing journals and memorandum vouchers, to aid in recording provisional entries that are useful for interim reports
u2022 Multiple inventory valuation. You can decide one valuation method for the business, and be able generate financial reports using any other valuation method - as the statutory method may not be appropriate for your needs, your bankers and for other decisions
u2022 Cash balances can go negative - you can get warned if this is about to happen, or see reports and make the necessary corrections
u2022 Several business exceptions are available (negative stocks, negative ledgers) - for
you to exercise control over these activities
u2022 A one-screen business ratios with drill down right up to the transactions - help you to correct course frequently u2022 Item wise & document wise profitability statements to control revenue leakage and inappropriate pricing
u2022 Internal audits are supported with audit controls - authorised users can mark vouchers as 'audited' and can get to see reports on changes made post audit, and the name of the person making the change
Inventory Accounting & Management
If you deal in goods, of any type, you'll appreciate the Inventory capabilities in Tally.ERP 9.
You can comprehensively record all types of inventory transactions, using goods receipt notes, delivery notes, stock journals, manufacturing journals and physical stock journals. All stock movements are fully recorded and maintained in stock registers.
Developed for all manufacturers, distributors, wholesalers or traders a small list of features are briefly described below:
Manufacturers:
. Bill of materials and Manufacturing Journals, to record material conversions
. Compound bill of materials support, for units that contain assemblies
. Multiple locations (godowns)
. Excise for manufacturers, including all documentation and invoice
. Costing for jobs
Distributors & Wholesalers:
. Multiple price lists, with effective dates of applicability
. Use multiple units of measure (say KG's & grams)
. Dual units of measure (say KG's and bags, to support variations as happens in commodities)
Traders:
. High speed billing, with support for POS printers
. Bar code support
. Automatic application of taxes
. Service billing & service tax
. Integrated sales return in bills
. Print bills (and any other document) in the customers language
Common:
. You can choose to de-link the computed inventory value to automatically appear in
your financial statements - and enter this figure manually.
. Stock ageing reports, to identify slow and non-moving stocks
. Invoice profitability reports to keep a pulse on sales
. Multi-currency transactions - buy and sell across the world - with integrated forex gain/loss calculations
. Physical stock take records to adjust physical vs. actual stocks
. Maintain batch & expiry details
Purchases & Payables: from Order to Payment
Tally.ERP 9 delivers the entire purchase cycle whether the need is the complete purchase order - goods receipt - rejections & returns - advances, debits & payments or a single payment entry, fulfilling all needs.
To ensure that you have the right stocks and minimize carrying costs, Tally.ERP 9 delivers the following to improve purchase orders:
. Define Re-order levels as a definite number or based on consumption
. Define minimum quantity to order as a definite number or based on consumption
. Pull up a report that shows the stock position, including complete details of open purchaseorders, sales orders that need to be fulfilled - check on past purchase history, and then place orders
. Optionally stagger delivery dates in the PO
When receiving goods:
. Make entries in accordance with supporting documentation, including errors your suppliers could have made (say of multiplication & round off)
. Incorporate additional costs
. Automatically manage input taxes
. Flexibility allows receipt of goods, quantities and rates different from that ordered - since this is common in real life
. Record samples & free items (using different 'actual' & 'billed' quantities)
. Multiple receipts for one order or one receipt for multiple orders, or against verbal ordersIn case there is a need to add other costs (say coolie and cartage) these additional charges can be apportioned to the cost of goods purchased.
Supplied goods may not match your needs and these are managed by the 'Rejections Out' inventory voucher. Supplier dues, input taxes and inventory positions are updated.
Suppliers often indicate likely profits, which may not be met. In case such assurances are made, you can look at Item profitability reports, and get the facts right. You could then negotiate a rebate and record this as a debit note.
Keep tabs of how much is due to whom, when. Manage advances, payables & post dated checks. Ensure there are no errors in payments - print checks from Tally.ERP 9.
Sales & Receivables: from Order to Receipt
The lifeline of a business, efficiencies in sales operations, both of goods & services, directly impact growth and profitability. The need to optimise and keep a close watch here requires exceptional capabilities from your business IT system - and Tally.ERP 9 meets these demands.
The sales process is supported with the following documents:
. Quotations - records of quotes
. Sales orders - accepted customer orders
. Deliver Notes - documents that accompany goods
. Sales Invoices/Cash Bill - to record the sale
. Credit Notes - for financial adjustments
. Rejections in - for goods returns
. Receipts - for advances and receipts
Do you have cash sales (sales across the counter)? With support for Point of Sale printers, bar codes and receipts in multiple tenders, you POS enable your business at no additional cost. Product sales may come with added services - and the integrated product & service billing will close this.
Enforce credit limits, where needed. Along with the Payment Performance of Debtors report you can identify persistent problems and take necessary business decisions. Interest for delays & reminder letters aid in collection.
For businesses engaged in Excisable goods, you get full support for Excise for Traders & Manufacturing Excise - matter of fact a business could be both!
Make multiple deliveries from one order, or one from multiple orders - this common need is available across all documents of the sales process.
Do you have multiple classes of customers? You can easily setup multiple prices (even in advance and specify the date from which they are effective).
Discounts against the line, or for the document, additional charges as a percentage or lump sum, automatic round off of bill totals, automatic computation of VAT & Service tax, returns & exchanges are all available.Need to verify that you are making the desired sales margins? Item wise and bill wise profitability reports will help you keep tabs.
Multi-company
Security: With multiple companies, possibly including personal accounts, you may need to control who gets access to which companies, and to do what. You can set up users, grant or deny access - and these are defined for each company.
Remote Access: You choose to specify which company is accessible remotely. You choose which remote users have access; you decide what access a remote user gets.
Central User Management: Users come and go. You might also have a password policy requiring users to change passwords every few weeks. You can take advantage of the ease of central user and password management that Tally.NET identities carry - and even remotely manage these while not in office.
Special NeedsMulti-CompanyMulti-PeriodMulti-Cost/Profit CentresMulti-CurrencyMulti-UnitsMulti-Location InventorySecurity and Access Control Remote Access
What is Series B
This Series will deliver major enhancements both in entirely new areas of functionality as well as in technology capabilities.
Technology & Capability Enhancements
Multi-session
Support for multiple application windows, which can even be launched by clicking on a mail link or a 'shortcut., Each of these are simultaneous 'windows' into different areas of your business processes & reports. Dynamic data refresh and the display of different views when resizing - for e.g. smaller windows displaying a more consolidated view of data, will improve organizational management and productivity.
Multi-threaded
A 'thread' is a specific task that is being performed by the microprocessor. Enhanced capabilities will be enabled such that each application window can perform more tasks simultaneously instead of linearly, including processing messages from the server. Multi-core processors, even on the desktop, are now common. We will take full advantage of these as well.
Multi Stack Architecture for Scale-up & Scale-down Deployments
To deliver the capabilities described above, and the ones that follow, Tally.ERP 9 will become 'componentised' - consisting of several layers of programs - often referred to as 'n-tier architecture'.
These software components are horizontally scalable, meaning that you can add one more computer to increase the computing power needed for a layer. In the same way, you can remove systems as needed, or collapse them into a single system - all of them even on a notebook, if required.
High Transaction Capacity with Low Latency & Management
Let us say that you start generating a report that needs to be extracted from a few thousand vouchers. This process is run in a 'session', which is isolated from all other users. Even if other users delete or modify any of the vouchers needed for the report while the report is being compiled, there is no impact on this session and you will get to see the report as if these other users did not exist.
In the same way, the user performing the edit will also be isolated. After the edit, he can open the voucher and see it with the changes he made, perhaps even delete it.
The architecture described above will in itself deliver substantial performance and transaction handling capacity. To push performance further in those cases when the storage media (typically the hard disk) is busy with other operations, additional capabilities will store these transactions 'temporarily' in a 'Q' for later write, while the user is free to continue his work (these transactions are protected against power failures and so on).
Payment Engine for Debit & Credit Cards
The facility for online payments using a variety of payment mechanisms (NEFT, online banking, credit cards), as well as receive payments (Debit / Credit Cards, NEFT etc) will be available.
Functional Enhancements
Online Banking and Reconciliation
Collaborating with Banks who wish to facilitate their customers with this capability, we will provide Online Banking - including Payment Instructions, Standing Instructions, DD, NEFT,RTGS Transfers, Balance Queries, Instruction Status, Automated or Semi-Automated Bank Reconciliation.
Point-of-Sale for most Retail Environments
Series B will support dedicated POS terminals, with Credit/Debit Card, Discount Coupons and various other payment mixes, Loyalty support, schemes, multi-layered supervisory control, simultaneous keyboard and scanner controls, integrated or isolated printing of bill and credit card authorisation slips, item substitution, rate markup/markdowns, integration with measuring devices - such as weighing scales, bill suspension and retrieval, bill reversals and cancellations, etc. It can also be used for other store operations (receipting, inventory management etc), and general business operations (finance and accounts) - both on the same machine or separate machines.
Income Tax
Comprehensive IT coverage encompassing corporate & individual income tax, including typical payroll requirements and e-Returns will be available.
EXIM Documentation
Import & export documentation has become a growing need with the world economy becoming more open. This requirement will be supported, additionally covering the processes that need to be managed along with the documentation.
Job Costing
The enhanced Job Costing functionality will support most job costing needs to a level of granularity that is increasingly needed. We expect that you will be able to handle most, if not all, project accounting needs as well.
Fixed Assets
To take advantage of tax breaks as well as to manage organizational assets, this feature will support all requirements - from opening assets, adding, removing, amalgamating, grouping, vendor tagging, AMC's, servicing, service calendars, repairs and upkeep, refurbishing, breaking-down, depreciating and disposal for complete fixed asset management.
Tally Addons Manufacturing Excise software, Tally Report Writer, Material Requirement Planning, Audit TrailVoucher-Type Level Security, SMS Plugin for Tally -
Hi. I am using a time capsule for few PC s. I have made 5 different account to access time capsule. but in windows when I enter account name and password for one account, i cannot access other accounts, because windows saves username. how can i prevent this from happenning. I really need to access all my accounts and dont want it to save automaticlly.
Why have 5 accounts if you need to access all of them.. just have one account?
Sorry I cannot follow why you would even use the PC to control the Time Capsule. Apple have not kept the Windows version of the utility up to date.. so they keep making it harder and harder to run windows with apple routers. -
An email sent from my iMac has a button linked to a clip hosted on Vimeo. When received, the link functions on iMac and iPad, but opens a window of app icons on iPhone and iPod touch. Any ideas what's wrong?
For anyone else reading this thread, it is worth knowing that sometimes an email is, or can be, corrupted thereby jamming the works. The solution above is good, but I just wanted to suggest another one.
If the problem arises, go to an online mail access service, such as Mail2Web.com and login to you mail account there and delete the offending message.
Problem solved.
And George, as this is all entirely voluntary, whinging about no takers may not endear people to you. Besides which, a few minutes of searching on Google would have found you a number of solutions. -
with my hp office 5010 all in one printer, i'm not able to scan, and this is one of his duties. why isn't it possible?? Bad ssoftware while downloading it from internet because I lost CD rom. No pilot available for scanning with it??? Bad version of soft??? I bauught this printer because of his utility and space occupped: able to print, copy and scan in same machine, gain of room, perfect, but my scanning function is not working!!!! I would like to solve this damned problem which upset me since several weeks.... Waiting for an answer and a solution, best regards
pmonteil31 wrote:
Waiting for an answer and a solution, best regards
Hi,
Sorry you have to wait longer because I can not find your printer model under Google. Must be very old ?
Regards,
BH
**Click the KUDOS thumb up on the left to say 'Thanks'**
Make it easier for other people to find solutions by marking a Reply 'Accept as Solution' if it solves your problem.
Maybe you are looking for
-
Need to get the exact time of each picture that I saved ( maybe as a excel sheet or word )
Hi guys, I am actually a new labview user. I have successfullly been able to save pictures. But unfortunately I got two problems. The first one is that I need to use two cameras at the same time. The program I have so far is for one camera. The secon
-
BCS 604 SP6 - Change to Consolidation Group extra features
Hi All, We've upgraded from SP0 to SP6 and noticed some new options for CCG config: IN UCWB we have rthe following new options: 1. under Consolidation area --> Settings --> Consolidation Functions used, we have: (checkbox) Separation of Goodwill fro
-
ITunes thinks movies are still on iPad
I recently moved from iPad 2 to the new iPad. On my old iPad, I had 2 movies synced to it when I did my final backup. When I restored the new iPad from cloud backup, it restored everything except the 2 movies, but still thinks they are on the iPad. I
-
Error in Server log of one of the server on the clustered environment(OBI)
Hi We had setup Clustered Environment and when we are trying to log in on to the Primary Server which is also Primary Controller, everything is fine on front end but we had faced the following error in the server log as follows : "[46036] Internal As
-
Nike+ iTunes synchronisation error ("could not connect to Nike+")
Using iTunes 9.0.1 on Snow Leopard. When I connect my iPod (3rd gen Nano) and try to sync with Nike+, I get the following error: iTunes could not connect to Nike+. An unknown error occurred (-9813). This has started probably during this week. Any oth