Category Archives: Flex Client

Phil 3.19.13

8:00 – 4:00 ESSO

  • Spent a good part of the morning trying to figure out Keystore again. I need to export a jks file?
  • Working on getting the Tomcat server to run inside of Eclipse.
  • Had to add flex jars and javaUtil classes to the Deployment Assembly dialog in Properties for RemoteObjectTestbed. Had to do it through the QuickFix mechanism in the Problems pane. Adding it directly didn’t seem to work. Also, tried to add the JavaUtils project rather than just the classes, but that didn’t seem to bring along the classes and added warnings about the jar files used to construct JavaUtils. Since they’re needed for logging and such, I’m going to add them?
  • Description Resource Path Location Type
    Classpath entry M2_REPO/junit/junit/3.8.1/junit-3.8.1.jar is marked for publish/export but is not exported on the project classpath. Classpath visibility within Eclipse and at runtime will differ. javaUtils P/javaUtils Classpath Dependency Validator Message
  • Things are working, but I still can’t get the eclipse server to work with the installed Tomcat location. It’s possible that this could be done using the VM arguments in the Arguments tab of Run Configurations, but I really don’t want to try that yet.

    Tomcat Run Configuration

    Tomcat Run Configuration

Phil 3.8.13

8:00 – 4:00 Esso

  • Backed up everything
  • Deployed the new version of PA with the concatination fix.
  • Long discussion with Lenny about mapping between Req’s and $$. Our thought was that the contract would be the best way to determine how to distribute money in the case where multiple projects shared a MIPR, but it might turn out to be the Budget Center/Sub Budget Center.
  • And we still need to add a check on the version of the software that’s being run. In case it’s not written down anywhere else, it’s as follows:
    • When the software loads up for the first time, it reaches out to the DB and asks what the date of the client code is. The table has the app name (PPM, PA, VSS, DataViz, etc), and a date.
    • If the client’s date is later than the stored date, then the date on the server is updated.
    • If the client’s date is older, a dialog comes up that tells the user to remove any cached data from their browser and reload the client.
  • Going to see if my DbObject code can be used for the version check dialog. Getting reacquainted with the code.
  • Got the example (written M 2011) running. Nothing in the server class folder but libraries. Kinda cool.

Phil 3.5.13

7:30 – 3:30 – ESSO

  • Good meeting with most of ISR-PMO, it seemed about PPM 2.0 (Beyte) The features are roughly as folows
  • Main panel
    • Global search (includes ad-hoc columns for things like searches for ACRN#)
    • Project selection dialog
    • User management
    • Appropriation Management
    • Project Mapping
      • Left Panel (project)
        • Project info. Move all the common elements from budget centers, etc to project info
      • Middle Panel (Req’s)
        • Funding by MIPR/EA
        • Date requested from service
        • Date received from service
        • Date submitted to BA/BF
        • Accept date
        • Funded budget (equals committed – autofilled)
        • Total budget
        • S.O.W. (affords keyword search)
      • Right Panel (Contracts)
        • D&D between bottom and top panels
        • Columns can have all of the COGNOS data. Columns may be ad hoc, and should be selectaple, with stored preferences
        • Top Panel(mapped)
          • Tracking of contract-specific requests (i.e. “awaiting response for xxx”)
          • Sub funded budget amounts (for EA). If a mapped line item does not have all the funded budget amount, then the contract remains in the unclaimed section with the remaining $$ amount
          • May have a “placeholder” contract number that an unclaimed or automatically mapped contract can override (via D&D)
        • Bottom Panel (unclaimed)

 

Phil 11.1.12

8:00 – 2:00 ESSO

  • We have our VizTool URN!
  • Looks like next week for Morpheus
  • Interview today?
  • Discovered a small bug today when deploying the new version. Although data tips for other items are able to use HTML, tips for pie charts don’t. Pulling out the offending code .
  • Talked to Dong about passing variables into SQL, and about creating some release builds to evaluate.
  • Burning a new disk

2:00 – 4:00 FP

  • More papers and HCC foundations

Phil 10.31.12

8:00 – 4:00

  • Backups and discussions with folks on site. Working on getting a meeting set up with the Morpheus folks.
  • fgmdev.com was down. Dong and I spent most of the morning trying to get it up. That you are reading this means success!
  • Working on adding color code. Incorporated and working nicely!
  • Checking code in
  • Burning a disk

Phil 10.29.12

8:00 – 4:00 ESSO

  • So begins a very wet day.
  • Working on figuring out why coloring chart lines is so different from all the other charts. Going to try building a toy project with just one line chart in it and (maybe?) an item renderer.
  • Well that turned out to be easier than I thought.
	private function init():void{
		var hsb:HsbObject = new HsbObject(0x0000AA);
		var lsa:Array = new Array();
		lsa.push(createLineSeries("Profit", "Profit", hsb));
		hsb.rotateHue(40);
		lsa.push(createLineSeries("Expenses", "Expenses", hsb));
		hsb.rotateHue(40);
		lsa.push(createLineSeries("Amount", "Amount", hsb));

		_linechart.series = lsa;
	}

	private function createLineSeries(yf:String, dn:String, hsb:HsbObject):LineSeries{
		var scs:SolidColorStroke = new SolidColorStroke(hsb.getHexColor());
		scs.weight = 3;
		var ls:LineSeries = new LineSeries();
		ls.yField = yf;
		ls.displayName = dn;
		ls.setStyle("lineStroke", scs);
		return ls;
	}

The project files are here. There are two projects. The EdgeUtils project contains the HsbObject class.

Phil 10.25.12

8:00 – 2:00 ESSO

  • Got the following error:
  • RangeError: Index ‘2’ specified is out of bounds.

    [C:autobuild3.xframeworksprojectsframeworksrcmxcollectionsListCollectionView.as:529]
    at mx.collections::ListCollectionView/addAll()[C:autobuild3.xframeworksprojectsframeworksrcmxcollectionsListCollectionView.as:512]
    at com.edgeti::WidgetBase/listColumnsHandler()[C:PhilProject WorkspacesHelios_3.6 FB4.5_32_bit_Aug_2012GenericQueryWidgetsrcmainflexcomedgetiWidgetBase.as:236]

  • Backups
  • Status meeting
    • Dave wants a contingincy plan if the server goes down. Need to talk to Vernon about this.
    • Looked at integrating with Morphious.

Phil 10.24.12

8:00 – 4:00 ESSO

  • Working on getting auto colors to work properly in trend widget.
  • 10:00 Meeting to talk to GAO folks. I think that went well. There will be a followup meeting.
  • Continued to beat on getting autopallete working for TrendWidget. After stepping through the ThresholdColumnRederer and figuring that out, I wound up with the same wrong coloring that I was getting when I ran the fill function from within the TrendWidget. The problem was that the ChartItem index was referring to each *cluster* of columns, not the columns within the cluster. As a hack to get around this, I put an Array in TrendWidget that counts the yFields that are passed to the field function. The *index* of the yFields is then used as the hue angle. Anyway, here’s the code:
protected function setColumnSeriesColor(element:ChartItem, index:Number):IFill {
	var yFieldName:String = "_unset_";
	var o:Object = element.element;

	// check if the yFieldName is in an array. if it is, then get the index. if not, add and get the index.
	if(o.hasOwnProperty("yField")){
		yFieldName = o.yField;
		if(_yfieldNameArray.lastIndexOf(yFieldName) == -1){
			_yfieldNameArray.push(yFieldName);
		}
		index = _yfieldNameArray.lastIndexOf(yFieldName);
	}
	return ColorUtil.setSeriesColor(element, index);
}
  • Next is getting the line charts to work with the color scheme.
  • Oh yeah, and add dataTip formatting to pie charts in QueryWidgetBase.

Phil 10.23.12

8:00 – 2:00 ESSO

  • Backups and housecleaning
  • Installed new vis2.swf. Not happy yet with the colors, but the commas work.
  • Talked to Lenny about FACTS
  • Got some heads up on tomorrow’s meeting.
  • Working with colors. I’m going to increment a fixed amount off of the border color – see how that works. Well – I think:
  • Well, that seems to work nicely:

Phil 10.17.12

9:30 – 4:00 ESSO

  • Dentist this morning
  • More tracing of where the tooltip functionality is handled in FlexiChart. I’m starting to think it’s the default behavior, so I’m working on getting a data tip function to extract what’s going on and insert the appropriate text and values.
  • Wound up adding a dataTipFunction at the <flexichart:FlexiChart/> level that got the displayName from the HitData.element, which in this case is always going to be a series of some kind. The display name allows me to get the correct value from the item data Object, which is then formatted.
  • Still need to bring all the colors in line with the values that are now calculated from the palette.
  • Added in change logs to VISIBILITY.

Phil 10.12.12

8:00 – 4:00 ESSO

  • Backups – all is well.
  • Farewell lunch for Jessica
  • Working on color recognizing code. Editor freaked out and gave warnings for items inherited from QueryWidgetBase and WidgetBase. Solved mysteriously after some flailing. Probably closing and re-opening the project fixed it.
  • Got the main piece of the color code working, but I can’t have a hybrid model that lets the default color scheme take over once I’ve run out of custom colors. So I’m converting the RGB of the two theme colors and calculating a family of colors in HSB space. This will be nicer anyway, since the theme will now be usable on the pie chart and will make the other charts look a little better.
  • Neat video on data visualization and ‘data foraging’: http://www.youtube.com/watch?v=_IbTZBMHiY4

Phil 3.9.12

8:00 – FP

  • Chasing down why the refresh rate drops after using glGetQueryObjectiv(drawQuery, GL_QUERY_RESULT, &result);
    • Adding a check to test that the result is available before pulling it.
    • Changed the code so that the hit test is only called once per mouse click. Not sure why that would fix it, but I’m not complaining.
    • Cleaned up and working. Example code for how to do non-fixed pipeline picking in OpenGL shown below:
// Code to show how to use object queries to get picking behavior. For this code to work,
// You'll need to add your preferred rendering framework. This code was pulled from an
// FLTK framework I've been building for data visualization

// Class-wide global variables here for the sake of a compact file
// Classes that are not part of the OpenGl library are from the OpenGl SuperBible,
// which I highly reccomend: http://www.starstonesoftware.com/OpenGL/

GLMatrixStack modelViewMatrix;
GLMatrixStack projectionMatrix;
GLFrustum viewFrustum;
bool isPicking;

// Constructor. Set up picking and the projection and model matrices
PickingExample::PickingExample(int x,int y,int w,int h,const char *l)
: Fl_Gl_Window(x,y,w,h,l)
{
	isPicking = false;
	pickQueryResult = READY;
	glGenQueries(1, &pickQueryID);
	if(pickQueryID == 0){
		pickQueryResult = PICK_ERROR;
	}

	viewFrustum.SetPerspective(45.0f, (float)screenWidth/(float)screenHeight, 0.5f, 1000.0f);
	projectionMatrix.LoadMatrix(viewFrustum.GetProjectionMatrix());
	modelViewMatrix.LoadIdentity();
}

// A slightly modified version of the original gluPickMatrix, taken from:
// http://oss.sgi.com/cgi-bin/cvsweb.cgi/projects/ogl-sample/main/gfx/lib/glu/libutil/project.c?rev=1.4;content-type=text%2Fplain
void PickingExample::setPickMatrix(GLdouble x, GLdouble y, GLdouble deltax, GLdouble deltay, GLint viewport[4])
{
	if (deltax <= 0 || deltay <= 0) {
		return;
	}

	projectionMatrix.LoadIdentity();

	/* Translate and scale the picked region to the entire window */
	GLfloat dx = (float)((viewport[2] - 2 * (x - viewport[0])) / deltax);
	GLfloat dy = (float)((viewport[3] - 2 * (y - viewport[1])) / deltay);
	projectionMatrix.Translate(dx, dy, 0);
	projectionMatrix.Scale((float)(viewport[2] / deltax), (float)(viewport[3] / deltay), 1.0);

	projectionMatrix.MultMatrix(viewFrustum.GetProjectionMatrix());
}

// the main drawing method. In this case, only drawing for picking is done, though it would 
// be easy enough to glClear() afther the picking code, and draw everything  over again with 
// a normal perspective
void PickingExample::draw() {
	GLint result;
	GLint viewport[4];
	glGetIntegerv(GL_VIEWPORT,viewport);

	glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
	modelViewMatrix.PushMatrix();

		// Have some Euler angle rotations and translations just to show how
		// setPickMatrix() doesn't care about eye or model position

		// global eye transformations
		modelViewMatrix.Rotate(eyeOrient[1], 0, 1, 0);
		modelViewMatrix.Rotate(eyeOrient[0], 1, 0, 0);
		modelViewMatrix.Translate(eyePos[0], eyePos[1], eyePos[2]);

		// global world transformations
		modelViewMatrix.Translate(worldPos[0], worldPos[1], worldPos[2]);
		modelViewMatrix.Rotate(worldOrient[0], 1, 0, 0);
		modelViewMatrix.Rotate(worldOrient[1], 0, 1, 0);

		// set up picking
		if(isPicking && (pickQueryResult != PICK_ERROR))
			projectionMatrix.PushMatrix();
				// set the projection matrix so that it's just looking at a (in this case) 10x10 pixel area
				// near the cursor. This method (shown above)
				setPickMatrix(mouseX,viewport[3]-mouseY,10,10,viewport);

				// for each item that you want to test, bracket it with a glBeginQuery()/glEndQuery()
				// You'll need a unique pickQueryID for each model
				glBeginQuery(GL_ANY_SAMPLES_PASSED, pickQueryID);

					// render your model associated with pickQueryID here. It is assumed that
					// the projection matrix and the model matrix will be handled by your shader(s)

				// finish the query for this particular model
				glEndQuery(GL_ANY_SAMPLES_PASSED);

			projectionMatrix.PopMatrix();

			// For each item that you queried above, see if at least one pixel was drawn
			// Again, you'll need a unique pickQueryID for each model
			glGetQueryObjectiv(pickQueryID, GL_QUERY_RESULT, &result);
			if(result)
				printf("hitn");
			else
				printf("missn");

			isPicking = false;
		}
	modelViewMatrix.PopMatrix();
}

Phil 3.8.12

7:30 – 11:00 VISIBILITY

  • Demo prep. See Mike’s notes for more detail

11:00 – 4:00 FP

  • Now that I have the pick matrix worked out, I’m going to see how to ask the pipeline if any pixels have been drawn. Also need to see how to prevent the test drawing from going to the render buffer
  • Generating query indices and deleting them in cleanup()
  • Added a pickRender()  and pickResult() method to DrawableObject
  • Picking works, but seems to slow down the display. Also, GL_QUERY_RESULT_AVAILABLE always returns zero, even if there is a result. And just to make things a little weirder, the call glGetQueryObjectiv(drawQuery, GL_QUERY_RESULT_AVAILABLE, &result) does not slow down the display, but the following almost identical call glGetQueryObjectiv(drawQuery, GL_QUERY_RESULT, &result) does. No ideas about this right now.

 

Here’s the code in question

static enum TRANSFORM_MODE{UNAVAILABLE, HIT, MISS};
TRANSFORM_MODE pickResult(){
	GLint result;

	glGetQueryObjectiv(drawQuery, GL_QUERY_RESULT_AVAILABLE, &result);
	if(result == 0)
		return UNAVAILABLE; // always returns this

	glGetQueryObjectiv(drawQuery, GL_QUERY_RESULT, &result); // slows down rendering once called.
	if(result)
		return HIT;
	else
		return MISS;
};